Changes

From Wazeopedia

Map Editing Tips and Hints

595 bytes added, 7 years ago
WME to Cartouche script updated with object selection
===Open Waze Map Editor in Cartouche===
<span style="font-family:Courier;font-size:small;"><nowiki>javascript:(function(){var center_lonlatpermalink=new OpenLayersString(unescape(document.LonLatgetElementById(wazeMap'permalink-container').centerinnerHTML).lonreplace(/&amp;/g,wazeMap'&'));var cleanQueryString=permalink.centersubstring(permalink.latindexOf('?'),permalink.indexOf('">'));center_lonlatvar hasSegments=cleanQueryString.transformindexOf(new OpenLayers'&segments');var hasNodes=cleanQueryString.indexOf('&nodes');var objectsList='';if (hasNodes>-1) objectsList='node-1='+cleanQueryString.substring(hasNodes+7);else if (hasSegments>-1) {var segments=cleanQueryString.substring(hasSegments+10);var objectsList='';var nextThing = segments.ProjectionindexOf("EPSG:900913&"); if (nextThing!=-1) segments=segments.substring(0,new OpenLayersnextThing);var segmentArry=segments.Projectionsplit("EPSG:4326,");var idx=0;var arryLen=segmentArry.length;for (idx=0;idx<arryLen;idx++){objectsList=objectsList+"&seg-"+(idx+1)+"="+segmentArry[idx];}}window.open('httpshttp://'+window.location.hostname+'/cartouche_old/?zoom='+cleanQueryString.substring(wazeMap0,cleanQueryString.zoom)+indexOf('&lon='+center_lonlat.lon+'&lat=layers'))+center_lonlat.latobjectsList,'Cartouche');})();</nowiki></span>
1,058
edits