diff --git a/OpenOtherMaps.js b/OpenOtherMaps.js index bdab7f2..99010e2 100644 --- a/OpenOtherMaps.js +++ b/OpenOtherMaps.js @@ -1,7 +1,7 @@ // ==UserScript== // @name WME Open Other Maps // @namespace https://greasyfork.org/users/30701-justins83-waze -// @version 2019.06.03.01 +// @version 2019.06.18.01 // @description Links for opening external resources at the WME location and WME from external resources // @author JustinS83 // @include https://www.waze.com/editor* @@ -48,7 +48,7 @@ //var jqUI_CssSrc = GM_getResourceText("jqUI_CSS"); //GM_addStyle(jqUI_CssSrc); - const updateMessage = "Adding support for loading WME from trimarc.org"; + const updateMessage = "Adding support for opening Melvin and NaviExpert from WME"; var settings = {}; var wazerIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAAAXNSR0IArs4c6QAACehJREFUeNrtXOlTVFcWpzJTU/kwf8F8nI8TNSGaVGKWSpllxkQzM2WcSWIq7IsoEhFlXyVgszVKs0QRmi0EBGUxLCLQsi8NzdaA0IhLEhNDAspoghHP3HObfnRLd9PvvdvQpNqqU1Y93rvvnF/fs593HRzW8B8APCUf02zNU0+6ykc0klz1ZIV8ZGJQrp6YJjRDaGGJZug18jftPRoJfYY8i2s4/J7+FY/f/EuuWuOrFXRyNndkAsQQXYOshWvi2hsSlNzp6afl6sl9RJh6IsyiWFBMElkb34HvwnfaPDCl6jt/lqs1AYTh21YDxdTOIu/EdyMPNgdMM8AfiY3wR9ux1sCsBGpiBnlBnmwCnHz11Ktkqw+tNzBG1G8IeVtHdYI/5aknTpGt/djmwFlWu8fII/K6puAUTdz4K3m50laBMQKUEnleI5XS7CDbd26jgKOncnPIu3Xdt3pyLwZyGw6cZQO+gDJYB5wRjYdVY5q120mLKAvznfO7AEcfJFY7CfV2I6uVOXUTbZPQ8m9Ig8zDcAv2bhg7WMOVJ17pgUMFlfBxihzeDpHCK37x8ML+aNjmHQVvBCTAruh0+Cg5F3zzK0Da2rcmIYCgOAkDLFZMpLb3gZOsCF72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8SCFEbuPmJFwsWlBPGTJrXP+BSCCPt81hUAnAAAAAElFTkSuQmCC" + var NaviExpertIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAIAAADZrBkAAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjEuNv1OCegAAAIQSURBVDhPY/hPFiBW27+fX//9+gblEKnt36/vnxeV/Dy/HconRtvPywff1rm+iOb/srIeKkRA27+/P05sfpWp+yKU/0Uk//uJcVBxNG1/Xj758/oZlAMEQG3HNz8P5H8ezP8qUeHDlBSoOLK2vx/fvmvN+vvlA5QPct6R19lWz/34gTrf98b/eX4HKoGs7cu6eU+txT4t6v159dSPE7s+zqx97iX2zIP/uTf/yyTNn+f3/jizA6oUWdvbqqSnJgLP7CVeBOo885R75ij4zJn/mRv/ywilb3uW/rpx4n1fElQpsrY3xbEvAk2AOp+aCTy1EnhqI/DMVfRVms3PS0f+//v3cU7VixAJqFJkbS8jnL5sWvI6L+S5q8pzD5VXGe6f1878/fg2UM+PM3tehMg99xWEKkXRFuvxMtzpx+nDfz++g4j8+/Ht972rH6ZWPveTfeYu9CrbFiIOBEhBsnH5ExO5Z86arzOD3nUUv+8ufVMS+TLa4qm9wDMH/peJJp+WdkKVImv79/vX5zWLnzlpP9ERfqIv+MRQEOLPl5Gm71oz3nfngRwMAwhtIPD3z/eTh9/3N75K8HwRZvOmKOrTwr4vGxa8rYn/eQEYMH+hytC1Ae38+uX3vdt/njz8/eDOz7NHPy2b9mFKw5+nD6DSMICuDQT+/v3z6jlQ2+97N/68eAJ0AlQcCWDTRhD8/w8AgQo6iwFQOnMAAAAASUVORK5CYII=" function initInterface(){ var $section = $("
"); @@ -107,6 +108,8 @@ `
`, `
`, `
`, + `
`, + `
`, '
', "

The below maps are for reference only and no data should be copied from them as it violates Waze's external sources policy.

", `
`, @@ -175,6 +178,8 @@ setChecked('chkArkDOT', settings.ArkDOT); setChecked('chkDelDOT', settings.DelDOT); setChecked('chkBagViewer', settings.BagViewer); + setChecked('chkMelvin', settings.Melvin); + setChecked('chkNaviExpert', settings.NaviExpert); if(settings.LangSetting == 0) setChecked("radOOMNoLang", true); @@ -961,14 +966,53 @@ window.open(`https://bagviewer.kadaster.nl/lvbag/bag-viewer/index.html#?geometry.x=${centerPoint.x}&geometry.y=${centerPoint.y}&zoomlevel=${z}`); }); } + + $('#OOMMelvin').remove(); + if(settings.Melvin) + { + let $section = $("
", {style:"padding:8px 16px"}); + $section.html([ + '', + `DelDOT`, + '' + ].join(' ')); + + $('.view-area.olMap >div > div > div.WazeControlPermalink').append($section.html()); + + $('#OOMMelvinImg').click(function(){ + let extent = W.map.getExtent(); + + let sw = WazeWrap.Geometry.ConvertTo4326(extent.left, extent.bottom); + let ne = WazeWrap.Geometry.ConvertTo4326(extent.right, extent.top); + window.open(`https://melvin.ndw.nu/public;sw=${sw.lat},${sw.lon};ne=${ne.lat},${ne.lon}`, 'Melvin'); + }); + } + + $('#OOMNaviExpert').remove(); + if(settings.NaviExpert) + { + let $section = $("
", {style:"padding:8px 16px"}); + $section.html([ + '', + `DelDOT`, + '' + ].join(' ')); + + $('.view-area.olMap >div > div > div.WazeControlPermalink').append($section.html()); + + $('#OOMNaviExpertImg').click(function(){ + let latlon = get4326CenterPoint(); + window.open(`https://traffic.naviexpert.pl/?cp=${latlon.lat},${latlon.lon},${(W.map.zoom + 12)}`, `NaviExpert`); + }); + } } function loadSettings() { var loadedSettings = $.parseJSON(localStorage.getItem("OOM_Settings")); var defaultSettings = { GMaps: true, - Mapillary: true, - Terraserver: true, + Mapillary: false, + Terraserver: false, Wikimapia: false, Bing: false, OSM: false, @@ -996,7 +1040,9 @@ OHGO: false, ArkDOT: false, DelDOT: false, - BagViewer: false + BagViewer: false, + Melvin: false, + NaviExpert: false //NJ511: false }; settings = loadedSettings ? loadedSettings : defaultSettings; @@ -1039,7 +1085,9 @@ OHGO: settings.OHGO, ArkDOT: settings.ArkDOT, DelDOT: settings.DelDOT, - BagViewer: settings.BagViewer + BagViewer: settings.BagViewer, + Melvin: settings.Melvin, + NaviExpert: settings.NaviExpert //NJ511: settings.NJ511 };