WME Polygon Kota PARIAMAN

Polygons Kota PARIAMAN, Sumatra Barat di WME layer

// ==UserScript==
// @name                WME Polygon Kota PARIAMAN
// @namespace           
// @description         Polygons Kota PARIAMAN, Sumatra Barat di WME layer
// @include             https://www.waze.com/editor/*
// @include             https://www.waze.com/*/editor/*
// @include             https://editor-beta.waze.com/*
// @version             1.4.6
// @grant               none
// @copyright           2015 hardian_n(4)- ci2212 (6)
// ==/UserScript==


//---------------------------------------------------------------------------------------
function bootstrap_MapOverlay()
{
  var bGreasemonkeyServiceDefined = false;

  try {
    bGreasemonkeyServiceDefined = (typeof Components.interfaces.gmIGreasemonkeyService === "object");
  }
  catch (err) { /* Ignore */ }

  if (typeof unsafeWindow === "undefined" || ! bGreasemonkeyServiceDefined) {
    unsafeWindow    = ( function () {
      var dummyElem = document.createElement('p');
      dummyElem.setAttribute('onclick', 'return window;');
      return dummyElem.onclick();
    }) ();
  }

    /* begin running the code! */
    setTimeout(InitMapOverlay, 1000);
}

function AddMapPoligon(mapLayer,kabPoints,kabColor,kabNumber){
    
    var mro_Map = unsafeWindow.Waze.map;
    var mro_OL = unsafeWindow.OpenLayers;
    var mapGroupLabel = '' + kabNumber;
    var mapName = 'mapGroup' + kabNumber;
    
    var style = {
        strokeColor: kabColor,
        strokeOpacity: '.8',
        strokeWidth: 3,
        fillColor: kabColor,
        fillOpacity: 0.15,
        label: mapGroupLabel,
        labelOutlineColor: "black",
        labelOutlineWidth: 3,
        fontSize: 14,
        fontColor: kabColor,
        fontOpacity: '.85',
        fontWeight: "bold"  
    };
    
    var attributes = {
        name: mapName,
        number: kabNumber
    };
    
    var pnt= [];
    for(i=0;i<kabPoints.length;i++){
        convPoint = new OpenLayers.Geometry.Point(kabPoints[i].lon,kabPoints[i].lat).transform(new OpenLayers.Projection("EPSG:4326"), mro_Map.getProjectionObject());
        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);
    mapLayer.addFeatures([feature]);

}

function CurrentMapLocation(kab_mapLayer){
    var mro_Map = unsafeWindow.Waze.map;

    for(i=0;i<kab_mapLayer.features.length;i++){
        var kabMapCenter = mro_Map.getCenter();
        var mapCenterPoint = new OpenLayers.Geometry.Point(kabMapCenter.lon,kabMapCenter.lat);
        var mpCenterCheck = kab_mapLayer.features[i].geometry.components[0].containsPoint(mapCenterPoint);
        //console.log('MapRaid: ' + kab_mapLayer.features[i].attributes.number + ': ' + mpCenterCheck);
        if(mpCenterCheck === true){
        	var mapLocationLabel = ('.WazeControlLocationInfo').text();
    		setTimeout(function(){$('.WazeControlLocationInfo').text(mapLocationLabel)},200);
        }
    }
}

function InitMapOverlay(){

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

    if (mro_Map === null) return;
    if (mro_OL === null) return;

    var mro_mapLayers = mro_Map.getLayersBy("uniqueName","__MapkabGroups");
        
    var kab_mapLayer = new mro_OL.Layer.Vector("Polygon Kota PARIAMAN", {
        displayInLayerSwitcher: true,
        uniqueName: "__MapkabGroups"
    });
        
    I18n.translations.en.layers.name["__MapkabGroups"] = "Polygon Kota PARIAMAN";
    mro_Map.addLayer(kab_mapLayer);
    kab_mapLayer.setVisibility(true);
    
var pariaman1 = [{lon:'100.175206',lat:'-0.607759'},{lon:'100.175824',lat:'-0.607959'},{lon:'100.176817',lat:'-0.60787'},{lon:'100.177567',lat:'-0.607692'},{lon:'100.17834',lat:'-0.607669'},{lon:'100.179355',lat:'-0.607891'},{lon:'100.180083',lat:'-0.608358'},{lon:'100.180326',lat:'-0.608957'},{lon:'100.18037',lat:'-0.609535'},{lon:'100.180415',lat:'-0.610224'},{lon:'100.180569',lat:'-0.610801'},{lon:'100.180702',lat:'-0.61129'},{lon:'100.181011',lat:'-0.612'},{lon:'100.181364',lat:'-0.612956'},{lon:'100.181584',lat:'-0.613545'},{lon:'100.181606',lat:'-0.613649'},{lon:'100.182059',lat:'-0.614822'},{lon:'100.182101',lat:'-0.61497'},{lon:'100.1821',lat:'-0.614976'},{lon:'100.182187',lat:'-0.615406'},{lon:'100.182129',lat:'-0.615745'},{lon:'100.182005',lat:'-0.616065'},{lon:'100.181453',lat:'-0.616288'},{lon:'100.180504',lat:'-0.616288'},{lon:'100.179706',lat:'-0.616591'},{lon:'100.179596',lat:'-0.616626'},{lon:'100.179567',lat:'-0.616644'},{lon:'100.179567',lat:'-0.616644'},{lon:'100.179335',lat:'-0.616732'},{lon:'100.178539',lat:'-0.617192'},{lon:'100.177859',lat:'-0.617586'},{lon:'100.176831',lat:'-0.617973'},{lon:'100.175957',lat:'-0.618182'},{lon:'100.175077',lat:'-0.618286'},{lon:'100.174841',lat:'-0.618271'},{lon:'100.174728',lat:'-0.618264'},{lon:'100.174417',lat:'-0.61816'},{lon:'100.174233',lat:'-0.617973'},{lon:'100.174167',lat:'-0.617938'},{lon:'100.174094',lat:'-0.618379'},{lon:'100.173948',lat:'-0.618629'},{lon:'100.173758',lat:'-0.618909'},{lon:'100.174019',lat:'-0.619164'},{lon:'100.174262',lat:'-0.619726'},{lon:'100.174405',lat:'-0.620215'},{lon:'100.174748',lat:'-0.620579'},{lon:'100.174841',lat:'-0.620591'},{lon:'100.175049',lat:'-0.620618'},{lon:'100.175354',lat:'-0.620532'},{lon:'100.175928',lat:'-0.61997'},{lon:'100.176339',lat:'-0.619801'},{lon:'100.176514',lat:'-0.619778'},{lon:'100.176664',lat:'-0.619921'},{lon:'100.17686',lat:'-0.620126'},{lon:'100.17698',lat:'-0.620409'},{lon:'100.176919',lat:'-0.620888'},{lon:'100.176812',lat:'-0.62137'},{lon:'100.176861',lat:'-0.621963'},{lon:'100.176716',lat:'-0.622425'},{lon:'100.176689',lat:'-0.62251'},{lon:'100.176408',lat:'-0.62252'},{lon:'100.17619',lat:'-0.622425'},{lon:'100.176107',lat:'-0.622388'},{lon:'100.175573',lat:'-0.621778'},{lon:'100.174923',lat:'-0.621566'},{lon:'100.174841',lat:'-0.621587'},{lon:'100.174253',lat:'-0.621735'},{lon:'100.173777',lat:'-0.62212'},{lon:'100.173723',lat:'-0.622251'},{lon:'100.173607',lat:'-0.622536'},{lon:'100.173607',lat:'-0.623269'},{lon:'100.173565',lat:'-0.623911'},{lon:'100.173389',lat:'-0.624392'},{lon:'100.173248',lat:'-0.624637'},{lon:'100.173157',lat:'-0.624937'},{lon:'100.173183',lat:'-0.625403'},{lon:'100.173277',lat:'-0.625859'},{lon:'100.173487',lat:'-0.626298'},{lon:'100.173535',lat:'-0.626616'},{lon:'100.173429',lat:'-0.627067'},{lon:'100.173323',lat:'-0.627431'},{lon:'100.173292',lat:'-0.627441'},{lon:'100.173218',lat:'-0.627615'},{lon:'100.173209',lat:'-0.627745'},{lon:'100.173132',lat:'-0.627914'},{lon:'100.173223',lat:'-0.628187'},{lon:'100.173362',lat:'-0.628308'},{lon:'100.173633',lat:'-0.628326'},{lon:'100.17419',lat:'-0.628555'},{lon:'100.174578',lat:'-0.628649'},{lon:'100.17521',lat:'-0.628912'},{lon:'100.175986',lat:'-0.62946'},{lon:'100.176827',lat:'-0.630235'},{lon:'100.176863',lat:'-0.630958'},{lon:'100.176698',lat:'-0.631236'},{lon:'100.17645',lat:'-0.631438'},{lon:'100.17594',lat:'-0.631587'},{lon:'100.175244',lat:'-0.631861'},{lon:'100.175153',lat:'-0.631939'},{lon:'100.174895',lat:'-0.632112'},{lon:'100.174507',lat:'-0.632479'},{lon:'100.174397',lat:'-0.632592'},{lon:'100.174386',lat:'-0.632601'},{lon:'100.1742',lat:'-0.632737'},{lon:'100.174051',lat:'-0.632973'},{lon:'100.174013',lat:'-0.63321'},{lon:'100.173976',lat:'-0.633521'},{lon:'100.173975',lat:'-0.633524'},{lon:'100.173914',lat:'-0.63383'},{lon:'100.173887',lat:'-0.633919'},{lon:'100.173703',lat:'-0.634254'},{lon:'100.173592',lat:'-0.634462'},{lon:'100.173541',lat:'-0.634555'},{lon:'100.173417',lat:'-0.634789'},{lon:'100.173376',lat:'-0.635096'},{lon:'100.173246',lat:'-0.635655'},{lon:'100.173184',lat:'-0.636072'},{lon:'100.173173',lat:'-0.636144'},{lon:'100.173125',lat:'-0.636559'},{lon:'100.173198',lat:'-0.637121'},{lon:'100.173198',lat:'-0.637732'},{lon:'100.173221',lat:'-0.637849'},{lon:'100.173242',lat:'-0.639787'},{lon:'100.173239',lat:'-0.639802'},{lon:'100.173132',lat:'-0.640297'},{lon:'100.173083',lat:'-0.640403'},{lon:'100.172891',lat:'-0.640649'},{lon:'100.172859',lat:'-0.640688'},{lon:'100.172855',lat:'-0.640696'},{lon:'100.172855',lat:'-0.640696'},{lon:'100.172807',lat:'-0.640756'},{lon:'100.172497',lat:'-0.641167'},{lon:'100.172099',lat:'-0.641589'},{lon:'100.172049',lat:'-0.641863'},{lon:'100.172043',lat:'-0.641963'},{lon:'100.172032',lat:'-0.641983'},{lon:'100.172009',lat:'-0.642393'},{lon:'100.172024',lat:'-0.642423'},{lon:'100.172155',lat:'-0.642692'},{lon:'100.172423',lat:'-0.643669'},{lon:'100.17232',lat:'-0.64393'},{lon:'100.172081',lat:'-0.644158'},{lon:'100.171529',lat:'-0.64445'},{lon:'100.171487',lat:'-0.644425'},{lon:'100.171341',lat:'-0.644515'},{lon:'100.170794',lat:'-0.644556'},{lon:'100.170342',lat:'-0.644479'},{lon:'100.169948',lat:'-0.644157'},{lon:'100.16973',lat:'-0.644005'},{lon:'100.16968',lat:'-0.643963'},{lon:'100.169663',lat:'-0.643959'},{lon:'100.169662',lat:'-0.643958'},{lon:'100.169376',lat:'-0.643846'},{lon:'100.169245',lat:'-0.643851'},{lon:'100.169237',lat:'-0.643849'},{lon:'100.169232',lat:'-0.643852'},{lon:'100.169065',lat:'-0.643858'},{lon:'100.168854',lat:'-0.64397'},{lon:'100.168667',lat:'-0.644144'},{lon:'100.168618',lat:'-0.644318'},{lon:'100.168651',lat:'-0.644422'},{lon:'100.168639',lat:'-0.644455'},{lon:'100.168739',lat:'-0.644836'},{lon:'100.169076',lat:'-0.645331'},{lon:'100.169703',lat:'-0.645667'},{lon:'100.169712',lat:'-0.645674'},{lon:'100.169911',lat:'-0.64586'},{lon:'100.170172',lat:'-0.645872'},{lon:'100.170768',lat:'-0.645997'},{lon:'100.170771',lat:'-0.645997'},{lon:'100.171088',lat:'-0.646088'},{lon:'100.171402',lat:'-0.646379'},{lon:'100.171618',lat:'-0.646706'},{lon:'100.171651',lat:'-0.646792'},{lon:'100.171875',lat:'-0.64719'},{lon:'100.172173',lat:'-0.647532'},{lon:'100.172191',lat:'-0.647551'},{lon:'100.173012',lat:'-0.648603'},{lon:'100.173081',lat:'-0.648713'},{lon:'100.173379',lat:'-0.649298'},{lon:'100.173404',lat:'-0.649633'},{lon:'100.17318',lat:'-0.650541'},{lon:'100.172926',lat:'-0.651467'},{lon:'100.172907',lat:'-0.651536'},{lon:'100.17277',lat:'-0.65207'},{lon:'100.172584',lat:'-0.652319'},{lon:'100.172409',lat:'-0.65248'},{lon:'100.172099',lat:'-0.652344'},{lon:'100.171614',lat:'-0.651996'},{lon:'100.17144',lat:'-0.651784'},{lon:'100.170967',lat:'-0.651274'},{lon:'100.170681',lat:'-0.650989'},{lon:'100.170284',lat:'-0.650827'},{lon:'100.170047',lat:'-0.650721'},{lon:'100.169901',lat:'-0.650713'},{lon:'100.169873',lat:'-0.650704'},{lon:'100.169752',lat:'-0.650705'},{lon:'100.169376',lat:'-0.650684'},{lon:'100.168058',lat:'-0.650671'},{lon:'100.168004',lat:'-0.650673'},{lon:'100.167692',lat:'-0.650659'},{lon:'100.166729',lat:'-0.650626'},{lon:'100.166554',lat:'-0.650597'},{lon:'100.166429',lat:'-0.650532'},{lon:'100.165755',lat:'-0.6501'},{lon:'100.165563',lat:'-0.650009'},{lon:'100.16531',lat:'-0.649876'},{lon:'100.165176',lat:'-0.649827'},{lon:'100.165153',lat:'-0.649816'},{lon:'100.165149',lat:'-0.649818'},{lon:'100.165',lat:'-0.649764'},{lon:'100.164751',lat:'-0.649801'},{lon:'100.164644',lat:'-0.649965'},{lon:'100.164606',lat:'-0.649976'},{lon:'100.164514',lat:'-0.650186'},{lon:'100.164266',lat:'-0.650671'},{lon:'100.164045',lat:'-0.65152'},{lon:'100.163961',lat:'-0.651844'},{lon:'100.163508',lat:'-0.653183'},{lon:'100.163381',lat:'-0.653369'},{lon:'100.163296',lat:'-0.653487'},{lon:'100.162513',lat:'-0.653947'},{lon:'100.161867',lat:'-0.653972'},{lon:'100.161469',lat:'-0.654333'},{lon:'100.160996',lat:'-0.655091'},{lon:'100.16097',lat:'-0.655242'},{lon:'100.160835',lat:'-0.655741'},{lon:'100.160847',lat:'-0.656015'},{lon:'100.160756',lat:'-0.657058'},{lon:'100.160664',lat:'-0.657256'},{lon:'100.160138',lat:'-0.657932'},{lon:'100.159792',lat:'-0.65833'},{lon:'100.159791',lat:'-0.658331'},{lon:'100.158908',lat:'-0.65922'},{lon:'100.157294',lat:'-0.661116'},{lon:'100.156308',lat:'-0.662295'},{lon:'100.15567',lat:'-0.662754'},{lon:'100.155584',lat:'-0.662793'},{lon:'100.155451',lat:'-0.6628'},{lon:'100.154954',lat:'-0.663036'},{lon:'100.154593',lat:'-0.6638'},{lon:'100.154457',lat:'-0.664223'},{lon:'100.154183',lat:'-0.66477'},{lon:'100.153549',lat:'-0.665355'},{lon:'100.153549',lat:'-0.665989'},{lon:'100.1536',lat:'-0.666107'},{lon:'100.153698',lat:'-0.666337'},{lon:'100.154071',lat:'-0.666797'},{lon:'100.15427',lat:'-0.667108'},{lon:'100.15422',lat:'-0.667984'},{lon:'100.15422',lat:'-0.668295'},{lon:'100.154544',lat:'-0.668718'},{lon:'100.154592',lat:'-0.668747'},{lon:'100.154697',lat:'-0.668935'},{lon:'100.155345',lat:'-0.669044'},{lon:'100.15589',lat:'-0.668961'},{lon:'100.156197',lat:'-0.668929'},{lon:'100.156229',lat:'-0.668915'},{lon:'100.157419',lat:'-0.66903'},{lon:'100.15786',lat:'-0.669557'},{lon:'100.158087',lat:'-0.669886'},{lon:'100.158789',lat:'-0.672163'},{lon:'100.158821',lat:'-0.672267'},{lon:'100.159009',lat:'-0.673563'},{lon:'100.159318',lat:'-0.675686'},{lon:'100.158663',lat:'-0.675041'},{lon:'100.151116',lat:'-0.667283'},{lon:'100.143135',lat:'-0.65908'},{lon:'100.141975',lat:'-0.658022'},{lon:'100.132385',lat:'-0.649273'},{lon:'100.129566',lat:'-0.647446'},{lon:'100.129204',lat:'-0.647109'},{lon:'100.128981',lat:'-0.647229'},{lon:'100.12882',lat:'-0.647144'},{lon:'100.1282',lat:'-0.646457'},{lon:'100.127717',lat:'-0.645852'},{lon:'100.127486',lat:'-0.645464'},{lon:'100.127108',lat:'-0.644936'},{lon:'100.126657',lat:'-0.644109'},{lon:'100.126426',lat:'-0.643742'},{lon:'100.125985',lat:'-0.643038'},{lon:'100.12526',lat:'-0.64164'},{lon:'100.124959',lat:'-0.64126'},{lon:'100.124413',lat:'-0.640408'},{lon:'100.123741',lat:'-0.639408'},{lon:'100.123444',lat:'-0.638996'},{lon:'100.122856',lat:'-0.638101'},{lon:'100.122275',lat:'-0.636911'},{lon:'100.121687',lat:'-0.635861'},{lon:'100.121169',lat:'-0.634918'},{lon:'100.12109',lat:'-0.634531'},{lon:'100.120296',lat:'-0.633868'},{lon:'100.118206',lat:'-0.631538'},{lon:'100.117623',lat:'-0.630726'},{lon:'100.117564',lat:'-0.630595'},{lon:'100.117226',lat:'-0.6303'},{lon:'100.116737',lat:'-0.629794'},{lon:'100.116049',lat:'-0.628688'},{lon:'100.115599',lat:'-0.627889'},{lon:'100.115413',lat:'-0.626904'},{lon:'100.115267',lat:'-0.625612'},{lon:'100.114976',lat:'-0.624067'},{lon:'100.114883',lat:'-0.623588'},{lon:'100.11507',lat:'-0.623186'},{lon:'100.115664',lat:'-0.622895'},{lon:'100.116047',lat:'-0.622549'},{lon:'100.116166',lat:'-0.622069'},{lon:'100.116245',lat:'-0.621204'},{lon:'100.116331',lat:'-0.620492'},{lon:'100.116086',lat:'-0.618886'},{lon:'100.116007',lat:'-0.617328'},{lon:'100.115702',lat:'-0.615717'},{lon:'100.114881',lat:'-0.613346'},{lon:'100.114114',lat:'-0.611668'},{lon:'100.113823',lat:'-0.611164'},{lon:'100.113823',lat:'-0.611163'},{lon:'100.113771',lat:'-0.611077'},{lon:'100.113783',lat:'-0.611096'},{lon:'100.113767',lat:'-0.61107'},{lon:'100.113645',lat:'-0.610865'},{lon:'100.113599',lat:'-0.610789'},{lon:'100.113599',lat:'-0.610788'},{lon:'100.113605',lat:'-0.610785'},{lon:'100.113588',lat:'-0.610763'},{lon:'100.113524',lat:'-0.610549'},{lon:'100.113488',lat:'-0.610426'},{lon:'100.113127',lat:'-0.60921'},{lon:'100.109744',lat:'-0.602371'},{lon:'100.106903',lat:'-0.596628'},{lon:'100.106709',lat:'-0.596282'},{lon:'100.102756',lat:'-0.58923'},{lon:'100.102614',lat:'-0.589037'},{lon:'100.098664',lat:'-0.583669'},{lon:'100.09695',lat:'-0.58134'},{lon:'100.095487',lat:'-0.578379'},{lon:'100.093594',lat:'-0.574549'},{lon:'100.093029',lat:'-0.572917'},{lon:'100.09302',lat:'-0.572898'},{lon:'100.09115',lat:'-0.568629'},{lon:'100.090378',lat:'-0.566952'},{lon:'100.090426',lat:'-0.563849'},{lon:'100.091067',lat:'-0.562825'},{lon:'100.09264',lat:'-0.561537'},{lon:'100.093621',lat:'-0.561358'},{lon:'100.094469',lat:'-0.560819'},{lon:'100.095316',lat:'-0.560774'},{lon:'100.09603',lat:'-0.561043'},{lon:'100.09652',lat:'-0.561267'},{lon:'100.096595',lat:'-0.561588'},{lon:'100.096637',lat:'-0.562595'},{lon:'100.097307',lat:'-0.562561'},{lon:'100.097457',lat:'-0.562569'},{lon:'100.097521',lat:'-0.56255'},{lon:'100.09779',lat:'-0.562536'},{lon:'100.098157',lat:'-0.562358'},{lon:'100.098349',lat:'-0.5623'},{lon:'100.098872',lat:'-0.562009'},{lon:'100.099577',lat:'-0.561665'},{lon:'100.100039',lat:'-0.561259'},{lon:'100.100149',lat:'-0.561038'},{lon:'100.100312',lat:'-0.560862'},{lon:'100.100574',lat:'-0.560401'},{lon:'100.101179',lat:'-0.55972'},{lon:'100.101248',lat:'-0.55965'},{lon:'100.101738',lat:'-0.559836'},{lon:'100.101872',lat:'-0.559917'},{lon:'100.101904',lat:'-0.559961'},{lon:'100.102633',lat:'-0.561259'},{lon:'100.102835',lat:'-0.561431'},{lon:'100.103381',lat:'-0.561962'},{lon:'100.104304',lat:'-0.561948'},{lon:'100.104396',lat:'-0.561953'},{lon:'100.104421',lat:'-0.561955'},{lon:'100.105112',lat:'-0.561955'},{lon:'100.106438',lat:'-0.56149'},{lon:'100.106543',lat:'-0.561303'},{lon:'100.106868',lat:'-0.560993'},{lon:'100.107509',lat:'-0.559604'},{lon:'100.107575',lat:'-0.559461'},{lon:'100.107592',lat:'-0.559431'},{lon:'100.107697',lat:'-0.559244'},{lon:'100.10831',lat:'-0.558717'},{lon:'100.108623',lat:'-0.55833'},{lon:'100.109441',lat:'-0.55799'},{lon:'100.109874',lat:'-0.557772'},{lon:'100.110403',lat:'-0.557724'},{lon:'100.111743',lat:'-0.557261'},{lon:'100.111786',lat:'-0.55725'},{lon:'100.111818',lat:'-0.557235'},{lon:'100.111833',lat:'-0.55723'},{lon:'100.112117',lat:'-0.557281'},{lon:'100.114113',lat:'-0.556655'},{lon:'100.114103',lat:'-0.556629'},{lon:'100.114117',lat:'-0.556626'},{lon:'100.114192',lat:'-0.556642'},{lon:'100.114543',lat:'-0.556514'},{lon:'100.114731',lat:'-0.556464'},{lon:'100.114928',lat:'-0.556373'},{lon:'100.116095',lat:'-0.555945'},{lon:'100.116594',lat:'-0.55577'},{lon:'100.116658',lat:'-0.555756'},{lon:'100.117325',lat:'-0.555521'},{lon:'100.118052',lat:'-0.555468'},{lon:'100.11835',lat:'-0.555462'},{lon:'100.118821',lat:'-0.555477'},{lon:'100.119125',lat:'-0.555487'},{lon:'100.119452',lat:'-0.55544'},{lon:'100.120361',lat:'-0.555422'},{lon:'100.121217',lat:'-0.55413'},{lon:'100.121209',lat:'-0.554017'},{lon:'100.121217',lat:'-0.554006'},{lon:'100.121223',lat:'-0.553997'},{lon:'100.121252',lat:'-0.553974'},{lon:'100.121283',lat:'-0.553971'},{lon:'100.122205',lat:'-0.553332'},{lon:'100.122667',lat:'-0.553448'},{lon:'100.12307',lat:'-0.553665'},{lon:'100.123258',lat:'-0.553811'},{lon:'100.123334',lat:'-0.553807'},{lon:'100.123532',lat:'-0.553912'},{lon:'100.124396',lat:'-0.553796'},{lon:'100.124574',lat:'-0.553404'},{lon:'100.124769',lat:'-0.553169'},{lon:'100.125044',lat:'-0.553031'},{lon:'100.126818',lat:'-0.552403'},{lon:'100.127048',lat:'-0.55159'},{lon:'100.127336',lat:'-0.55101'},{lon:'100.127362',lat:'-0.550857'},{lon:'100.127422',lat:'-0.550681'},{lon:'100.127695',lat:'-0.550282'},{lon:'100.127855',lat:'-0.550081'},{lon:'100.127871',lat:'-0.549837'},{lon:'100.127909',lat:'-0.549618'},{lon:'100.127969',lat:'-0.549274'},{lon:'100.128576',lat:'-0.548519'},{lon:'100.129749',lat:'-0.548386'},{lon:'100.129893',lat:'-0.54837'},{lon:'100.130516',lat:'-0.548608'},{lon:'100.131027',lat:'-0.548865'},{lon:'100.13158',lat:'-0.549618'},{lon:'100.131777',lat:'-0.549885'},{lon:'100.13199',lat:'-0.550127'},{lon:'100.132294',lat:'-0.550544'},{lon:'100.132467',lat:'-0.550669'},{lon:'100.132698',lat:'-0.550835'},{lon:'100.133275',lat:'-0.551009'},{lon:'100.133278',lat:'-0.551009'},{lon:'100.133314',lat:'-0.551099'},{lon:'100.133336',lat:'-0.551141'},{lon:'100.13364',lat:'-0.551332'},{lon:'100.133802',lat:'-0.551515'},{lon:'100.133965',lat:'-0.55176'},{lon:'100.134066',lat:'-0.552168'},{lon:'100.134187',lat:'-0.552433'},{lon:'100.134411',lat:'-0.552679'},{lon:'100.134407',lat:'-0.552728'},{lon:'100.134428',lat:'-0.55275'},{lon:'100.135005',lat:'-0.554026'},{lon:'100.135164',lat:'-0.555429'},{lon:'100.135593',lat:'-0.558339'},{lon:'100.135896',lat:'-0.560395'},{lon:'100.135712',lat:'-0.561091'},{lon:'100.135097',lat:'-0.56171'},{lon:'100.135066',lat:'-0.561767'},{lon:'100.134817',lat:'-0.562218'},{lon:'100.134701',lat:'-0.562244'},{lon:'100.13397',lat:'-0.562391'},{lon:'100.133293',lat:'-0.562505'},{lon:'100.133024',lat:'-0.562486'},{lon:'100.132727',lat:'-0.562398'},{lon:'100.132601',lat:'-0.562455'},{lon:'100.132504',lat:'-0.562448'},{lon:'100.132411',lat:'-0.562543'},{lon:'100.13236',lat:'-0.562566'},{lon:'100.132278',lat:'-0.562676'},{lon:'100.13211',lat:'-0.562846'},{lon:'100.132068',lat:'-0.562959'},{lon:'100.132061',lat:'-0.562968'},{lon:'100.132032',lat:'-0.563053'},{lon:'100.131941',lat:'-0.5633'},{lon:'100.131946',lat:'-0.563314'},{lon:'100.131927',lat:'-0.563371'},{lon:'100.132161',lat:'-0.563941'},{lon:'100.132295',lat:'-0.564251'},{lon:'100.132405',lat:'-0.564547'},{lon:'100.132438',lat:'-0.564744'},{lon:'100.132392',lat:'-0.565116'},{lon:'100.13267',lat:'-0.565451'},{lon:'100.132632',lat:'-0.56554'},{lon:'100.132569',lat:'-0.565668'},{lon:'100.132337',lat:'-0.565948'},{lon:'100.132067',lat:'-0.566024'},{lon:'100.131828',lat:'-0.566024'},{lon:'100.131742',lat:'-0.566219'},{lon:'100.13156',lat:'-0.566403'},{lon:'100.131434',lat:'-0.566756'},{lon:'100.131259',lat:'-0.56716'},{lon:'100.131259',lat:'-0.567552'},{lon:'100.131147',lat:'-0.567645'},{lon:'100.130983',lat:'-0.567728'},{lon:'100.130858',lat:'-0.567791'},{lon:'100.130933',lat:'-0.568195'},{lon:'100.130983',lat:'-0.568296'},{lon:'100.131026',lat:'-0.568381'},{lon:'100.13104',lat:'-0.568578'},{lon:'100.131046',lat:'-0.568622'},{lon:'100.130983',lat:'-0.568826'},{lon:'100.131132',lat:'-0.569275'},{lon:'100.131231',lat:'-0.570019'},{lon:'100.13126',lat:'-0.570236'},{lon:'100.131259',lat:'-0.570239'},{lon:'100.131259',lat:'-0.570255'},{lon:'100.131259',lat:'-0.570341'},{lon:'100.131212',lat:'-0.570817'},{lon:'100.131134',lat:'-0.571022'},{lon:'100.131159',lat:'-0.57135'},{lon:'100.131159',lat:'-0.57135'},{lon:'100.131153',lat:'-0.571415'},{lon:'100.131279',lat:'-0.571481'},{lon:'100.131435',lat:'-0.571653'},{lon:'100.131912',lat:'-0.57188'},{lon:'100.132177',lat:'-0.571953'},{lon:'100.13245',lat:'-0.572096'},{lon:'100.132597',lat:'-0.572079'},{lon:'100.132746',lat:'-0.572063'},{lon:'100.132915',lat:'-0.572082'},{lon:'100.133341',lat:'-0.572258'},{lon:'100.133347',lat:'-0.572257'},{lon:'100.133465',lat:'-0.572323'},{lon:'100.135156',lat:'-0.571755'},{lon:'100.135268',lat:'-0.571755'},{lon:'100.135325',lat:'-0.572379'},{lon:'100.135634',lat:'-0.572234'},{lon:'100.1359',lat:'-0.57215'},{lon:'100.136279',lat:'-0.572009'},{lon:'100.136368',lat:'-0.571811'},{lon:'100.136565',lat:'-0.571641'},{lon:'100.136734',lat:'-0.571471'},{lon:'100.136813',lat:'-0.571366'},{lon:'100.136818',lat:'-0.57136'},{lon:'100.136838',lat:'-0.571346'},{lon:'100.136887',lat:'-0.571268'},{lon:'100.137627',lat:'-0.57029'},{lon:'100.13764',lat:'-0.570277'},{lon:'100.138199',lat:'-0.570052'},{lon:'100.138794',lat:'-0.57065'},{lon:'100.139074',lat:'-0.571004'},{lon:'100.139192',lat:'-0.571258'},{lon:'100.139233',lat:'-0.571412'},{lon:'100.140028',lat:'-0.572207'},{lon:'100.140335',lat:'-0.572275'},{lon:'100.140638',lat:'-0.572351'},{lon:'100.141327',lat:'-0.572351'},{lon:'100.141357',lat:'-0.572378'},{lon:'100.144063',lat:'-0.572661'},{lon:'100.144128',lat:'-0.572661'},{lon:'100.144484',lat:'-0.572715'},{lon:'100.144968',lat:'-0.572682'},{lon:'100.145044',lat:'-0.572661'},{lon:'100.145303',lat:'-0.572661'},{lon:'100.14551',lat:'-0.572531'},{lon:'100.145549',lat:'-0.57252'},{lon:'100.145585',lat:'-0.572483'},{lon:'100.146205',lat:'-0.572093'},{lon:'100.146215',lat:'-0.57208'},{lon:'100.146324',lat:'-0.572032'},{lon:'100.146775',lat:'-0.571382'},{lon:'100.147325',lat:'-0.571198'},{lon:'100.147952',lat:'-0.571071'},{lon:'100.148685',lat:'-0.570617'},{lon:'100.149466',lat:'-0.570669'},{lon:'100.149551',lat:'-0.570699'},{lon:'100.149615',lat:'-0.570766'},{lon:'100.150053',lat:'-0.571247'},{lon:'100.150136',lat:'-0.571593'},{lon:'100.150136',lat:'-0.571594'},{lon:'100.150236',lat:'-0.572017'},{lon:'100.150284',lat:'-0.572252'},{lon:'100.150291',lat:'-0.572247'},{lon:'100.150292',lat:'-0.572251'},{lon:'100.150635',lat:'-0.572448'},{lon:'100.151125',lat:'-0.573335'},{lon:'100.150681',lat:'-0.574371'},{lon:'100.150584',lat:'-0.574923'},{lon:'100.150068',lat:'-0.575378'},{lon:'100.149907',lat:'-0.576028'},{lon:'100.149616',lat:'-0.57658'},{lon:'100.149423',lat:'-0.577295'},{lon:'100.149264',lat:'-0.578512'},{lon:'100.149068',lat:'-0.579277'},{lon:'100.149128',lat:'-0.579675'},{lon:'100.14952',lat:'-0.579971'},{lon:'100.15001',lat:'-0.581203'},{lon:'100.15001',lat:'-0.581696'},{lon:'100.14952',lat:'-0.582978'},{lon:'100.147952',lat:'-0.584309'},{lon:'100.147609',lat:'-0.584482'},{lon:'100.146972',lat:'-0.584802'},{lon:'100.146531',lat:'-0.585197'},{lon:'100.146237',lat:'-0.585838'},{lon:'100.146189',lat:'-0.586725'},{lon:'100.146238',lat:'-0.587267'},{lon:'100.146581',lat:'-0.588204'},{lon:'100.14712',lat:'-0.588598'},{lon:'100.147923',lat:'-0.588975'},{lon:'100.147918',lat:'-0.588987'},{lon:'100.148591',lat:'-0.589302'},{lon:'100.149222',lat:'-0.589201'},{lon:'100.149668',lat:'-0.58914'},{lon:'100.149674',lat:'-0.589138'},{lon:'100.150109',lat:'-0.588977'},{lon:'100.150428',lat:'-0.588865'},{lon:'100.150471',lat:'-0.588844'},{lon:'100.151138',lat:'-0.588597'},{lon:'100.15163',lat:'-0.5883'},{lon:'100.15163',lat:'-0.5883'},{lon:'100.151859',lat:'-0.588165'},{lon:'100.152309',lat:'-0.588103'},{lon:'100.153148',lat:'-0.588005'},{lon:'100.15365',lat:'-0.588149'},{lon:'100.153952',lat:'-0.588266'},{lon:'100.154336',lat:'-0.588474'},{lon:'100.154679',lat:'-0.588669'},{lon:'100.155099',lat:'-0.588911'},{lon:'100.15606',lat:'-0.591509'},{lon:'100.156494',lat:'-0.592487'},{lon:'100.156308',lat:'-0.59355'},{lon:'100.156054',lat:'-0.594997'},{lon:'100.15682',lat:'-0.594876'},{lon:'100.157797',lat:'-0.594225'},{lon:'100.158882',lat:'-0.593338'},{lon:'100.159698',lat:'-0.593247'},{lon:'100.161273',lat:'-0.593736'},{lon:'100.162033',lat:'-0.594876'},{lon:'100.162142',lat:'-0.596288'},{lon:'100.166378',lat:'-0.601285'},{lon:'100.167199',lat:'-0.60264'},{lon:'100.170527',lat:'-0.599823'},{lon:'100.171889',lat:'-0.600455'},{lon:'100.171961',lat:'-0.600445'},{lon:'100.173021',lat:'-0.600506'},{lon:'100.173639',lat:'-0.600599'},{lon:'100.173896',lat:'-0.601083'},{lon:'100.173896',lat:'-0.602071'},{lon:'100.173603',lat:'-0.602652'},{lon:'100.173601',lat:'-0.602692'},{lon:'100.174521',lat:'-0.603064'},{lon:'100.17873',lat:'-0.605446'},{lon:'100.178641',lat:'-0.605883'},{lon:'100.178634',lat:'-0.605918'},{lon:'100.178606',lat:'-0.605932'},{lon:'100.177701',lat:'-0.606384'},{lon:'100.177408',lat:'-0.606531'},{lon:'100.175732',lat:'-0.606531'},{lon:'100.175098',lat:'-0.606751'},{lon:'100.174842',lat:'-0.60684'},{lon:'100.174842',lat:'-0.60684'},{lon:'100.174904',lat:'-0.607035'},{lon:'100.174996',lat:'-0.607182'},{lon:'100.174986',lat:'-0.607226'},{lon:'100.175206',lat:'-0.607759'}];
var pariaman2 = [{lon:'100.111694',lat:'-0.661377'},{lon:'100.110474',lat:'-0.661377'},{lon:'100.109924',lat:'-0.660828'},{lon:'100.10968',lat:'-0.660278'},{lon:'100.110107',lat:'-0.659607'},{lon:'100.110718',lat:'-0.658875'},{lon:'100.111694',lat:'-0.659119'},{lon:'100.112122',lat:'-0.659912'},{lon:'100.111877',lat:'-0.6604'},{lon:'100.111694',lat:'-0.661377'}];
var pariaman3 = [{lon:'100.102478',lat:'-0.647888'},{lon:'100.101685',lat:'-0.648071'},{lon:'100.101074',lat:'-0.647888'},{lon:'100.100708',lat:'-0.647278'},{lon:'100.100708',lat:'-0.646729'},{lon:'100.101074',lat:'-0.645996'},{lon:'100.101929',lat:'-0.645813'},{lon:'100.102905',lat:'-0.646301'},{lon:'100.103088',lat:'-0.646973'},{lon:'100.102478',lat:'-0.647888'}];
var pariaman4 = [{lon:'100.09967',lat:'-0.634399'},{lon:'100.098877',lat:'-0.634399'},{lon:'100.098083',lat:'-0.634216'},{lon:'100.0979',lat:'-0.633606'},{lon:'100.098083',lat:'-0.632874'},{lon:'100.098877',lat:'-0.632385'},{lon:'100.09967',lat:'-0.632385'},{lon:'100.100281',lat:'-0.632874'},{lon:'100.100525',lat:'-0.633728'},{lon:'100.09967',lat:'-0.634399'}];
var pariaman5 = [{lon:'100.075519',lat:'-0.596821'},{lon:'100.075217',lat:'-0.596842'},{lon:'100.075096',lat:'-0.596781'},{lon:'100.074956',lat:'-0.596741'},{lon:'100.074815',lat:'-0.596619'},{lon:'100.074754',lat:'-0.596356'},{lon:'100.074614',lat:'-0.596113'},{lon:'100.074634',lat:'-0.59585'},{lon:'100.074634',lat:'-0.595627'},{lon:'100.074734',lat:'-0.595566'},{lon:'100.074875',lat:'-0.595384'},{lon:'100.075237',lat:'-0.595263'},{lon:'100.075579',lat:'-0.595384'},{lon:'100.0758',lat:'-0.595586'},{lon:'100.075921',lat:'-0.59591'},{lon:'100.075921',lat:'-0.596315'},{lon:'100.075861',lat:'-0.596619'},{lon:'100.075519',lat:'-0.596821'}];
AddMapPoligon(kab_mapLayer,pariaman1,'#FFFF00','Kota PARIAMAN');
AddMapPoligon(kab_mapLayer,pariaman2,'#FFFF00','');
AddMapPoligon(kab_mapLayer,pariaman3,'#FFFF00','');
AddMapPoligon(kab_mapLayer,pariaman4,'#FFFF00','');
AddMapPoligon(kab_mapLayer,pariaman5,'#FFFF00','');


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

bootstrap_MapOverlay();