Greasy Fork is available in English.

WME Greater Toronto Area Overlay 6-28-15

Creates polygons for MapRaid groups in a WME "Greater Toronto Area Groups" layer

// ==UserScript==
// @name                WME Greater Toronto Area Overlay 6-28-15
// @namespace           https://greasyfork.org/users/5252
// @description         Creates polygons for MapRaid groups in a WME "Greater Toronto Area Groups" layer
// @include             https://www.waze.com/editor/*
// @include             https://www.waze.com/*/editor/*
// @include             https://editor-beta.waze.com/*
// @version             1.8
// @grant               none
// @copyright           2014 davielde
// ==/UserScript==


//---------------------------------------------------------------------------------------


//generated by rickzabel's overlay generator

//RZ RaidName will be replaced by the name of the layer in your KML file
//RZ RaidNameNoSpaces will be replaced by the name of the layer in your KML file
//RZ AreaPoints will be replaced by the names, colors, and area points from your KML file


setTimeout(InitMapRaidOverlay, 1000);

function AddRaidPolygon(raidLayer,groupPoints,groupColor,groupNumber){
    
    var mro_Map = Waze.map;
    var mro_OL = OpenLayers;
    var raidGroupLabel = 'Raid Group ' + groupNumber;
    var groupName = 'RaidGroup' + groupNumber;
    
    var style = {
        strokeColor: groupColor,
        strokeOpacity: .8,
        strokeWidth: 3,
        fillColor: groupColor,
        fillOpacity: 0.15,
        label: raidGroupLabel,
        labelOutlineColor: "black",
        labelOutlineWidth: 3,
        fontSize: 14,
        fontColor: groupColor,
        fontOpacity: .85,
        fontWeight: "bold"  
    };
    
    var attributes = {
        name: groupName,
        number: groupNumber
    };
    
    var pnt= [];
    for(i=0;i<groupPoints.length;i++){
        convPoint = new OpenLayers.Geometry.Point(groupPoints[i].lon,groupPoints[i].lat).transform(new OpenLayers.Projection("EPSG:4326"), mro_Map.getProjectionObject());
        //console.log('MapRaid: ' + JSON.stringify(groupPoints[i]) + ', ' + groupPoints[i].lon + ', ' + groupPoints[i].lat);
        pnt.push(convPoint);
    }
		       
    var ring = new mro_OL.Geometry.LinearRing(pnt);
    var polygon = new mro_OL.Geometry.Polygon([ring]);
    
    var feature = new mro_OL.Feature.Vector(polygon,attributes,style);
    raidLayer.addFeatures([feature]);

}

function CurrentRaidLocation(raid_mapLayer){
    var mro_Map = Waze.map;

    for(i=0;i<raid_mapLayer.features.length;i++){
        var raidMapCenter = mro_Map.getCenter();
        var raidCenterPoint = new OpenLayers.Geometry.Point(raidMapCenter.lon,raidMapCenter.lat);
        var raidCenterCheck = raid_mapLayer.features[i].geometry.components[0].containsPoint(raidCenterPoint);
        //console.log('MapRaid: ' + raid_mapLayer.features[i].attributes.number + ': ' + raidCenterCheck);
        if(raidCenterCheck === true){
        	var raidLocationLabel = 'Raid Group ' + raid_mapLayer.features[i].attributes.number + ' - ' + $('.WazeControlLocationInfo').text();
    		//setTimeout(function(){$('.WazeControlLocationInfo').text(raidLocationLabel);},200);
			setTimeout(function(){$('.WazeControlLocationInfo').text(raidLocationLabel);},50);
			var str = $('.WazeControlLocationInfo').text();
			
			var n2 = str.indexOf(" - ");
			
			if(n2 > 0){
				var n = str.length;
				var res = str.substring(n2+2, n);
				var rescount = res.indexOf(" - ");
				if(rescount>0){
					var n3 = res.length;
					var res2 = res.substring(rescount+2, n3);
						
				}
				var raidLocationLabel = 'Raid Group ' + raid_mapLayer.features[i].attributes.number + ' - ' + res2;
			} else {
				var raidLocationLabel = 'Raid Group ' + raid_mapLayer.features[i].attributes.number + ' - ' + $('.WazeControlLocationInfo').text();
			}	
    		setTimeout(function(){$('.WazeControlLocationInfo').text(raidLocationLabel);},200);
		}
    }
}

function InitMapRaidOverlay(){

    var mro_Map = Waze.map;
    var mro_OL = OpenLayers;

    //if (!mro_Map) return;
	
    //if (!mro_OL) return;

    var mro_mapLayers = mro_Map.getLayersBy("uniqueName","__GreaterTorontoArea");
        
    var raid_mapLayer = new mro_OL.Layer.Vector("Greater Toronto Area 6-28-15", {
        displayInLayerSwitcher: true,
        uniqueName: "__GreaterTorontoArea"
    });
        
    I18n.translations.en.layers.name["__GreaterTorontoArea"] = "Greater Toronto Area";
    mro_Map.addLayer(raid_mapLayer);
    raid_mapLayer.setVisibility(true);
    

var V01Toronto = [{lon:'-79.189453',lat:'43.728685'},{lon:'-79.147074',lat:'43.760307'},{lon:'-79.111862',lat:'43.791605'},{lon:'-79.154606',lat:'43.8118'},{lon:'-79.159324',lat:'43.831706'},{lon:'-79.17057',lat:'43.855574'},{lon:'-79.638863',lat:'43.749769'},{lon:'-79.592807',lat:'43.66908399999999'},{lon:'-79.587931',lat:'43.665388'},{lon:'-79.608802',lat:'43.646045'},{lon:'-79.604368',lat:'43.644947'},{lon:'-79.595471',lat:'43.644345'},{lon:'-79.59169700000001',lat:'43.64382100000001'},{lon:'-79.588781',lat:'43.642924'},{lon:'-79.586896',lat:'43.63935399999999'},{lon:'-79.585391',lat:'43.636157'},{lon:'-79.586804',lat:'43.633706'},{lon:'-79.584137',lat:'43.628305999999995'},{lon:'-79.573482',lat:'43.62570699999999'},{lon:'-79.569168',lat:'43.627963'},{lon:'-79.563973',lat:'43.627877'},{lon:'-79.567833',lat:'43.614535'},{lon:'-79.565083',lat:'43.610966'},{lon:'-79.56439',lat:'43.607432'},{lon:'-79.558028',lat:'43.604216'},{lon:'-79.55595',lat:'43.60077'},{lon:'-79.55179600000001',lat:'43.592760000000006'},{lon:'-79.540278',lat:'43.584229'},{lon:'-79.386284',lat:'43.60443599999999'},{lon:'-79.316633',lat:'43.614802000000005'},{lon:'-79.30889',lat:'43.650031'},{lon:'-79.189453',lat:'43.728685'}];
AddRaidPolygon(raid_mapLayer, V01Toronto,"#4186F0","01 - Toronto");

var V02Peel = [{lon:'-79.638863',lat:'43.749769'},{lon:'-79.708954',lat:'43.87105799999999'},{lon:'-79.753876',lat:'43.993802'},{lon:'-80.085526',lat:'43.922379'},{lon:'-80.144538',lat:'43.864402000000005'},{lon:'-79.793014',lat:'43.603267'},{lon:'-79.807356',lat:'43.58833'},{lon:'-79.697817',lat:'43.506696'},{lon:'-79.680416',lat:'43.52302600000001'},{lon:'-79.613501',lat:'43.47455'},{lon:'-79.531315',lat:'43.578182'},{lon:'-79.55179600000001',lat:'43.592760000000006'},{lon:'-79.558028',lat:'43.604216'},{lon:'-79.56439',lat:'43.607432'},{lon:'-79.565083',lat:'43.610966'},{lon:'-79.567833',lat:'43.614535'},{lon:'-79.563973',lat:'43.627877'},{lon:'-79.569168',lat:'43.627963'},{lon:'-79.573482',lat:'43.62570699999999'},{lon:'-79.584137',lat:'43.628305999999995'},{lon:'-79.586804',lat:'43.633706'},{lon:'-79.585391',lat:'43.636157'},{lon:'-79.588781',lat:'43.642924'},{lon:'-79.595471',lat:'43.644345'},{lon:'-79.604368',lat:'43.644947'},{lon:'-79.608802',lat:'43.646045'},{lon:'-79.587931',lat:'43.665388'},{lon:'-79.592807',lat:'43.66908399999999'},{lon:'-79.638863',lat:'43.749769'}];
AddRaidPolygon(raid_mapLayer, V02Peel,"#F8971B","02 - Peel");

var V03York  = [{lon:'-79.638863',lat:'43.749769'},{lon:'-79.17057',lat:'43.855574'},{lon:'-79.249504',lat:'44.03949599999999'},{lon:'-79.327983',lat:'44.223488999999994'},{lon:'-79.157352',lat:'44.263763000000004'},{lon:'-79.215031',lat:'44.40153'},{lon:'-79.260708',lat:'44.456194'},{lon:'-79.383596',lat:'44.341143'},{lon:'-79.501848',lat:'44.34155700000001'},{lon:'-79.519022',lat:'44.27394300000001'},{lon:'-79.512176',lat:'44.208296'},{lon:'-79.519794',lat:'44.158256'},{lon:'-79.541433',lat:'44.145570000000006'},{lon:'-79.545372',lat:'44.113601'},{lon:'-79.563379',lat:'44.072443'},{lon:'-79.610188',lat:'44.043114'},{lon:'-79.657059',lat:'44.01602799999999'},{lon:'-79.753876',lat:'43.993802'},{lon:'-79.708954',lat:'43.87105799999999'},{lon:'-79.638863',lat:'43.749769'}];
AddRaidPolygon(raid_mapLayer, V03York ,"#EE9C96","03 - York ");

var V04Durham = [{lon:'-79.170528',lat:'43.855574'},{lon:'-79.159281',lat:'43.83170599999999'},{lon:'-79.154563',lat:'43.8118'},{lon:'-79.111819',lat:'43.791605'},{lon:'-78.936101',lat:'43.834351'},{lon:'-78.784398',lat:'43.86669200000001'},{lon:'-78.73014700000002',lat:'43.86378799999999'},{lon:'-78.681013',lat:'43.870307'},{lon:'-78.64292',lat:'43.888928'},{lon:'-78.568756',lat:'43.89268'},{lon:'-78.476368',lat:'43.894434'},{lon:'-78.436535',lat:'43.909593'},{lon:'-78.516272',lat:'44.098904'},{lon:'-78.692508',lat:'44.058405'},{lon:'-78.730808',lat:'44.140374'},{lon:'-78.767496',lat:'44.222331'},{lon:'-78.832641',lat:'44.16596200000001'},{lon:'-78.854779',lat:'44.144527'},{lon:'-78.85873300000002',lat:'44.218148'},{lon:'-78.881834',lat:'44.218312'},{lon:'-78.893943',lat:'44.208137'},{lon:'-78.907852',lat:'44.189261'},{lon:'-78.928775',lat:'44.155441999999994'},{lon:'-78.94937',lat:'44.212858'},{lon:'-78.979084',lat:'44.285314'},{lon:'-79.01162200000002',lat:'44.35776100000001'},{lon:'-79.06409',lat:'44.474883'},{lon:'-79.064146',lat:'44.475007'},{lon:'-79.081892',lat:'44.51450899999999'},{lon:'-79.133904',lat:'44.510347'},{lon:'-79.13893',lat:'44.512549'},{lon:'-79.143612',lat:'44.511323000000004'},{lon:'-79.153142',lat:'44.498957000000004'},{lon:'-79.157732',lat:'44.48400800000001'},{lon:'-79.162915',lat:'44.467118'},{lon:'-79.260776',lat:'44.456082'},{lon:'-79.215099',lat:'44.401418'},{lon:'-79.157352',lat:'44.263763000000004'},{lon:'-79.327983',lat:'44.223488999999994'},{lon:'-79.289714',lat:'44.133847'},{lon:'-79.189971',lat:'43.901561'},{lon:'-79.170528',lat:'43.855574'}];
AddRaidPolygon(raid_mapLayer, V04Durham,"#FFDD5E","04 - Durham");

var V05Halton = [{lon:'-79.969482',lat:'43.734887'},{lon:'-80.160027',lat:'43.561113'},{lon:'-80.009474',lat:'43.453348'},{lon:'-79.861504',lat:'43.34797600000001'},{lon:'-79.913006',lat:'43.308442'},{lon:'-79.875914',lat:'43.281425'},{lon:'-79.819965',lat:'43.303757'},{lon:'-79.805328',lat:'43.295066'},{lon:'-79.787167',lat:'43.302991000000006'},{lon:'-79.613501',lat:'43.47455'},{lon:'-79.680416',lat:'43.52302600000001'},{lon:'-79.697817',lat:'43.506696'},{lon:'-79.807356',lat:'43.58833'},{lon:'-79.793014',lat:'43.603267'},{lon:'-79.969482',lat:'43.734887'}];
AddRaidPolygon(raid_mapLayer, V05Halton,"#7C3592","05 - Halton");

var V06Hamilton = [{lon:'-79.787167',lat:'43.302991000000006'},{lon:'-79.805328',lat:'43.295066'},{lon:'-79.819965',lat:'43.303757'},{lon:'-79.875914',lat:'43.281425'},{lon:'-79.913006',lat:'43.308442'},{lon:'-79.861504',lat:'43.34797600000001'},{lon:'-80.036774',lat:'43.47185799999999'},{lon:'-80.091476',lat:'43.43760900000001'},{lon:'-80.078181',lat:'43.417816'},{lon:'-80.205315',lat:'43.39712399999999'},{lon:'-80.190359',lat:'43.343292000000005'},{lon:'-80.248947',lat:'43.33441800000001'},{lon:'-80.200539',lat:'43.20893'},{lon:'-79.753532',lat:'43.051078000000004'},{lon:'-79.710617',lat:'43.155105'},{lon:'-79.660149',lat:'43.142581'},{lon:'-79.619293',lat:'43.230446'},{lon:'-79.787167',lat:'43.302991000000006'}];
AddRaidPolygon(raid_mapLayer, V06Hamilton,"#4186F0","06 - Hamilton");

var V07Waterloo = [{lon:'-80.23847600000002',lat:'43.30656799999999'},{lon:'-80.248947',lat:'43.33441800000001'},{lon:'-80.190359',lat:'43.343292000000005'},{lon:'-80.205315',lat:'43.39712399999999'},{lon:'-80.26886',lat:'43.386836'},{lon:'-80.295633',lat:'43.45142200000001'},{lon:'-80.305424',lat:'43.472605'},{lon:'-80.340339',lat:'43.502485'},{lon:'-80.368968',lat:'43.52769'},{lon:'-80.3734',lat:'43.532728'},{lon:'-80.367056',lat:'43.56917'},{lon:'-80.384582',lat:'43.56292299999999'},{lon:'-80.448189',lat:'43.610615'},{lon:'-80.557423',lat:'43.689629'},{lon:'-80.59536',lat:'43.661539'},{lon:'-80.608063',lat:'43.589592'},{lon:'-80.775089',lat:'43.65706800000001'},{lon:'-80.832582',lat:'43.580607'},{lon:'-80.890274',lat:'43.506854'},{lon:'-80.79483',lat:'43.46799600000001'},{lon:'-80.765376',lat:'43.437143'},{lon:'-80.736982',lat:'43.406408'},{lon:'-80.736294',lat:'43.369119'},{lon:'-80.735436',lat:'43.311065000000006'},{lon:'-80.503693',lat:'43.347901'},{lon:'-80.471764',lat:'43.266706'},{lon:'-80.23847600000002',lat:'43.30656799999999'}];
AddRaidPolygon(raid_mapLayer, V07Waterloo,"#A61B4A","07 - Waterloo");

var V08Niagara = [{lon:'-79.619293',lat:'43.230446'},{lon:'-79.660149',lat:'43.142581'},{lon:'-79.710617',lat:'43.155105'},{lon:'-79.753532',lat:'43.051078000000004'},{lon:'-79.510803',lat:'42.965216'},{lon:'-79.45687',lat:'42.898193000000006'},{lon:'-79.435616',lat:'42.871435'},{lon:'-79.383885',lat:'42.85665000000001'},{lon:'-79.339515',lat:'42.851214'},{lon:'-79.313933',lat:'42.862804'},{lon:'-79.154783',lat:'42.86050099999999'},{lon:'-79.096077',lat:'42.83268900000001'},{lon:'-79.026867',lat:'42.859598'},{lon:'-78.927379',lat:'42.881413'},{lon:'-78.908444',lat:'42.897095'},{lon:'-78.90561',lat:'42.91331'},{lon:'-78.910371',lat:'42.934113'},{lon:'-78.927154',lat:'42.9519'},{lon:'-78.959757',lat:'42.95718500000001'},{lon:'-78.985162',lat:'42.972258000000004'},{lon:'-79.020367',lat:'42.985688'},{lon:'-79.02578',lat:'43.014864'},{lon:'-79.010633',lat:'43.03723500000001'},{lon:'-79.002026',lat:'43.05281000000001'},{lon:'-79.002356',lat:'43.059595'},{lon:'-79.005432',lat:'43.065878'},{lon:'-79.040792',lat:'43.07253'},{lon:'-79.076157',lat:'43.076913'},{lon:'-79.075817',lat:'43.082301'},{lon:'-79.065518',lat:'43.09139'},{lon:'-79.058307',lat:'43.105836'},{lon:'-79.058177',lat:'43.109729'},{lon:'-79.059764',lat:'43.11362299999999'},{lon:'-79.069118',lat:'43.120157'},{lon:'-79.060711',lat:'43.12567'},{lon:'-79.056077',lat:'43.127674000000006'},{lon:'-79.051014',lat:'43.133875'},{lon:'-79.043889',lat:'43.138448'},{lon:'-79.04268500000002',lat:'43.142206'},{lon:'-79.043026',lat:'43.150033'},{lon:'-79.04487',lat:'43.153116'},{lon:'-79.04620000000001',lat:'43.160958'},{lon:'-79.05268',lat:'43.170301'},{lon:'-79.053669',lat:'43.180146'},{lon:'-79.04852',lat:'43.199166'},{lon:'-79.05624400000002',lat:'43.210431'},{lon:'-79.052768',lat:'43.223591'},{lon:'-79.05564400000002',lat:'43.241129'},{lon:'-79.05736',lat:'43.25558'},{lon:'-79.070538',lat:'43.26169'},{lon:'-79.08012',lat:'43.268051'},{lon:'-79.135722',lat:'43.262117'},{lon:'-79.20636',lat:'43.230366'},{lon:'-79.202831',lat:'43.243124'},{lon:'-79.217059',lat:'43.248123'},{lon:'-79.226114',lat:'43.235597'},{lon:'-79.228401',lat:'43.22683099999999'},{lon:'-79.325757',lat:'43.188266999999996'},{lon:'-79.619293',lat:'43.230446'}];
AddRaidPolygon(raid_mapLayer, V08Niagara,"#0BA9CC","08 - Niagara");

var V09Wellington = [{lon:'-81.009064',lat:'43.983428'},{lon:'-80.969925',lat:'43.821647'},{lon:'-80.759125',lat:'43.844927000000006'},{lon:'-80.873108',lat:'43.698657999999995'},{lon:'-80.775089',lat:'43.65706800000001'},{lon:'-80.608063',lat:'43.589592'},{lon:'-80.59536',lat:'43.661539'},{lon:'-80.557423',lat:'43.689629'},{lon:'-80.384582',lat:'43.56292299999999'},{lon:'-80.367056',lat:'43.56917'},{lon:'-80.3734',lat:'43.532728'},{lon:'-80.305424',lat:'43.472605'},{lon:'-80.26886',lat:'43.386836'},{lon:'-80.078181',lat:'43.417816'},{lon:'-80.091476',lat:'43.43760900000001'},{lon:'-80.036774',lat:'43.47185799999999'},{lon:'-80.160027',lat:'43.561113'},{lon:'-79.969482',lat:'43.734887'},{lon:'-80.140246',lat:'43.861184'},{lon:'-80.249977',lat:'43.761176'},{lon:'-80.388275',lat:'43.858538'},{lon:'-80.398636',lat:'43.85681100000001'},{lon:'-80.437431',lat:'44.026396'},{lon:'-80.566684',lat:'43.998252'},{lon:'-80.716629',lat:'43.98249400000001'},{lon:'-80.720662',lat:'43.99584300000001'},{lon:'-80.752754',lat:'43.992384'},{lon:'-80.74825',lat:'43.976082'},{lon:'-80.825729',lat:'43.967616'},{lon:'-80.836029',lat:'44.006151'},{lon:'-81.009064',lat:'43.983428'}];
AddRaidPolygon(raid_mapLayer, V09Wellington,"#FFDD5E","09 - Wellington");

var V10Simcoe = [{lon:'-79.657059',lat:'44.01602799999999'},{lon:'-79.563379',lat:'44.072443'},{lon:'-79.545372',lat:'44.113601'},{lon:'-79.541433',lat:'44.145570000000006'},{lon:'-79.519794',lat:'44.158256'},{lon:'-79.512176',lat:'44.208296'},{lon:'-79.519022',lat:'44.27394300000001'},{lon:'-79.501848',lat:'44.34155700000001'},{lon:'-79.383596',lat:'44.341143'},{lon:'-79.260708',lat:'44.456194'},{lon:'-79.162846',lat:'44.46723'},{lon:'-79.157698',lat:'44.484004000000006'},{lon:'-79.15307300000002',lat:'44.499069'},{lon:'-79.143544',lat:'44.511436'},{lon:'-79.138861',lat:'44.51266100000001'},{lon:'-79.133835',lat:'44.510459'},{lon:'-79.081822',lat:'44.514621000000005'},{lon:'-79.174347',lat:'44.721369'},{lon:'-79.205315',lat:'44.795925'},{lon:'-79.38446',lat:'44.772574'},{lon:'-79.390455',lat:'44.823052000000004'},{lon:'-79.679718',lat:'44.890904'},{lon:'-79.829407',lat:'44.820812'},{lon:'-79.949436',lat:'44.89535'},{lon:'-79.978117',lat:'44.938757'},{lon:'-80.09824300000001',lat:'44.905023'},{lon:'-80.171671',lat:'44.935386'},{lon:'-80.29090200000002',lat:'44.873898000000004'},{lon:'-80.253504',lat:'44.818263'},{lon:'-80.05718',lat:'44.688451'},{lon:'-80.025169',lat:'44.654309'},{lon:'-80.04228993030162',lat:'44.56517136343682'},{lon:'-80.042612',lat:'44.563491'},{lon:'-80.093821',lat:'44.515112'},{lon:'-80.238369',lat:'44.537133999999995'},{lon:'-80.296423',lat:'44.550616000000005'},{lon:'-80.229034',lat:'44.252576999999995'},{lon:'-80.034714',lat:'44.294858'},{lon:'-79.951458',lat:'43.951676'},{lon:'-79.657059',lat:'44.01602799999999'}];
AddRaidPolygon(raid_mapLayer, V10Simcoe,"#7C3592","10 - Simcoe");

var V11Brant = [{lon:'-80.436401',lat:'43.178769'},{lon:'-80.611496',lat:'43.15134799999999'},{lon:'-80.545235',lat:'42.98732100000001'},{lon:'-80.241566',lat:'43.03188200000001'},{lon:'-80.21015200000001',lat:'43.07992200000001'},{lon:'-80.126038',lat:'43.093964'},{lon:'-80.03128',lat:'43.06487500000001'},{lon:'-79.99373',lat:'43.136162000000006'},{lon:'-80.200539',lat:'43.20893'},{lon:'-80.23847600000002',lat:'43.30656799999999'},{lon:'-80.471764',lat:'43.266706'},{lon:'-80.436401',lat:'43.178769'}];
AddRaidPolygon(raid_mapLayer, V11Brant,"#F8971B","11 - Brant");

var V12Dufferin = [{lon:'-80.034714',lat:'44.294858'},{lon:'-80.229034',lat:'44.252576999999995'},{lon:'-80.410649',lat:'44.21456'},{lon:'-80.425544',lat:'44.201405'},{lon:'-80.36087',lat:'44.16706'},{lon:'-80.398979',lat:'44.135776'},{lon:'-80.374947',lat:'44.039478'},{lon:'-80.437431',lat:'44.026396'},{lon:'-80.398636',lat:'43.85681100000001'},{lon:'-80.388275',lat:'43.858538'},{lon:'-80.249977',lat:'43.761176'},{lon:'-80.140246',lat:'43.861184'},{lon:'-80.144538',lat:'43.864402000000005'},{lon:'-80.085526',lat:'43.922379'},{lon:'-79.951458',lat:'43.951676'},{lon:'-80.034714',lat:'44.294858'}];
AddRaidPolygon(raid_mapLayer, V12Dufferin,"#EE9C96","12 - Dufferin");

var V13Middlesex = [{lon:'-80.898685',lat:'42.912561'},{lon:'-80.923576',lat:'43.000755000000005'},{lon:'-80.994644',lat:'42.994604'},{lon:'-81.02331',lat:'43.05026500000001'},{lon:'-81.037582',lat:'43.04620400000001'},{lon:'-81.132317',lat:'43.23157199999999'},{lon:'-81.224284',lat:'43.203299'},{lon:'-81.431973',lat:'43.29301'},{lon:'-81.4684',lat:'43.288857'},{lon:'-81.464996',lat:'43.27020600000001'},{lon:'-81.787033',lat:'43.23507299999999'},{lon:'-81.790123',lat:'42.8153'},{lon:'-81.840935',lat:'42.845765'},{lon:'-81.828918',lat:'42.538157'},{lon:'-81.299512',lat:'42.818048999999995'},{lon:'-81.08672300000002',lat:'42.876723'},{lon:'-81.06124900000002',lat:'42.889046'},{lon:'-80.898685',lat:'42.912561'}];
AddRaidPolygon(raid_mapLayer, V13Middlesex,"#F8971B","13 - Middlesex");

var V14Lambton = [{lon:'-81.742744',lat:'43.324179'},{lon:'-81.77401500000002',lat:'43.319222'},{lon:'-81.864516',lat:'43.261798'},{lon:'-81.991718',lat:'43.214818'},{lon:'-82.00374',lat:'43.22338'},{lon:'-82.028467',lat:'43.218121'},{lon:'-82.037015',lat:'43.17334'},{lon:'-82.106864',lat:'43.112984'},{lon:'-82.143691',lat:'43.10171600000001'},{lon:'-82.159255',lat:'43.092234'},{lon:'-82.176008',lat:'43.061687'},{lon:'-82.233512',lat:'43.04221199999999'},{lon:'-82.38616',lat:'43.01973199999999'},{lon:'-82.3996',lat:'43.00889599999999'},{lon:'-82.417658',lat:'43.00432800000001'},{lon:'-82.42198',lat:'42.999758'},{lon:'-82.423554',lat:'42.99460400000001'},{lon:'-82.419003',lat:'42.98462'},{lon:'-82.411365',lat:'42.977399'},{lon:'-82.412567',lat:'42.97350599999999'},{lon:'-82.414208',lat:'42.966396'},{lon:'-82.420311',lat:'42.960039'},{lon:'-82.433201',lat:'42.947073'},{lon:'-82.449017',lat:'42.933955'},{lon:'-82.453522',lat:'42.925565000000006'},{lon:'-82.460804',lat:'42.905017'},{lon:'-82.46939',lat:'42.88770000000001'},{lon:'-82.469047',lat:'42.878936'},{lon:'-82.466132',lat:'42.851974'},{lon:'-82.470425',lat:'42.836416'},{lon:'-82.478148',lat:'42.82110900000001'},{lon:'-82.480202',lat:'42.804847'},{lon:'-82.472558',lat:'42.79133'},{lon:'-82.466979',lat:'42.774416'},{lon:'-82.465782',lat:'42.756466'},{lon:'-82.479568',lat:'42.735511'},{lon:'-82.480303',lat:'42.72023'},{lon:'-82.485202',lat:'42.708082'},{lon:'-82.494046',lat:'42.699845'},{lon:'-82.495678',lat:'42.690599'},{lon:'-82.508722',lat:'42.66456900000001'},{lon:'-82.507686',lat:'42.639549'},{lon:'-82.512817',lat:'42.619813'},{lon:'-82.51894100000001',lat:'42.610502'},{lon:'-82.529011',lat:'42.601696999999994'},{lon:'-82.551031',lat:'42.587115'},{lon:'-82.560682',lat:'42.577589'},{lon:'-82.579581',lat:'42.56366'},{lon:'-82.582684',lat:'42.553523'},{lon:'-82.589894',lat:'42.549559'},{lon:'-82.605344',lat:'42.547617'},{lon:'-82.612059',lat:'42.549613'},{lon:'-82.619462',lat:'42.554959999999994'},{lon:'-82.627574',lat:'42.556422'},{lon:'-82.639248',lat:'42.555109'},{lon:'-82.65564',lat:'42.545493'},{lon:'-82.678174',lat:'42.520952'},{lon:'-82.608712',lat:'42.48983400000001'},{lon:'-82.47127500000002',lat:'42.457914'},{lon:'-82.39133',lat:'42.510888'},{lon:'-82.41257600000002',lat:'42.56943900000001'},{lon:'-82.483292',lat:'42.631432999999994'},{lon:'-82.245497',lat:'42.626766'},{lon:'-82.245261',lat:'42.631055'},{lon:'-82.009632',lat:'42.62395200000001'},{lon:'-82.008037',lat:'42.652831000000006'},{lon:'-81.833725',lat:'42.649868999999995'},{lon:'-81.840935',lat:'42.845765'},{lon:'-81.790123',lat:'42.8153'},{lon:'-81.787033',lat:'43.23507299999999'},{lon:'-81.738555',lat:'43.240499'},{lon:'-81.742744',lat:'43.324179'}];
AddRaidPolygon(raid_mapLayer, V14Lambton,"#0BA9CC","14 - Lambton");

var V15Essex = [{lon:'-82.944717',lat:'42.346112'},{lon:'-82.95845',lat:'42.339514'},{lon:'-82.988836',lat:'42.331649'},{lon:'-83.019905',lat:'42.328601'},{lon:'-83.061458',lat:'42.318706'},{lon:'-83.079655',lat:'42.308804'},{lon:'-83.097496',lat:'42.291025'},{lon:'-83.112268',lat:'42.259773'},{lon:'-83.126678',lat:'42.239194'},{lon:'-83.132172',lat:'42.177653'},{lon:'-83.120499',lat:'42.122164000000005'},{lon:'-83.144531',lat:'42.061529'},{lon:'-83.119125',lat:'42.042154'},{lon:'-82.998276',lat:'41.994202'},{lon:'-82.914505',lat:'41.971743000000004'},{lon:'-82.790909',lat:'41.999305'},{lon:'-82.729469',lat:'42.017432'},{lon:'-82.666626',lat:'42.02940400000001'},{lon:'-82.590393',lat:'42.011556000000006'},{lon:'-82.558136',lat:'41.979911'},{lon:'-82.50737',lat:'41.9028'},{lon:'-82.482605',lat:'41.986036000000006'},{lon:'-82.461277',lat:'42.059361'},{lon:'-82.457865',lat:'42.175527'},{lon:'-82.434525',lat:'42.190896'},{lon:'-82.43042',lat:'42.316416'},{lon:'-82.460572',lat:'42.319494'},{lon:'-82.490853',lat:'42.30943500000001'},{lon:'-82.562331',lat:'42.31737799999999'},{lon:'-82.632431',lat:'42.30296'},{lon:'-82.714144',lat:'42.303262'},{lon:'-82.795122',lat:'42.310496'},{lon:'-82.88449',lat:'42.33530799999999'},{lon:'-82.944717',lat:'42.346112'}];
AddRaidPolygon(raid_mapLayer, V15Essex,"#D698AD","15 - Essex");


    
	
    setTimeout(function(){CurrentRaidLocation(raid_mapLayer);},3000);
    mro_Map.events.register("moveend", Waze.map, function(){CurrentRaidLocation(raid_mapLayer);});
    mro_Map.events.register("zoomend", Waze.map, function(){CurrentRaidLocation(raid_mapLayer);});
       
}