Skip to content

Commit 554a3b0

Browse files
authored
Merge pull request #1884 from 0xff1ce/fix(ShowOnMap)
Show On Map updated to use leaflet over WikiMedia
2 parents 9fc91b3 + 3aed784 commit 554a3b0

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/core/operations/ShowOnMap.mjs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/**
22
* @author j433866 [[email protected]]
3-
* @copyright Crown Copyright 2019
3+
* @author 0xff1ce [github.com/0xff1ce]
4+
* @copyright Crown Copyright 2024
45
* @license Apache-2.0
56
*/
67

@@ -22,7 +23,7 @@ class ShowOnMap extends Operation {
2223
this.name = "Show on map";
2324
this.module = "Hashing";
2425
this.description = "Displays co-ordinates on a slippy map.<br><br>Co-ordinates will be converted to decimal degrees before being shown on the map.<br><br>Supported formats:<ul><li>Degrees Minutes Seconds (DMS)</li><li>Degrees Decimal Minutes (DDM)</li><li>Decimal Degrees (DD)</li><li>Geohash</li><li>Military Grid Reference System (MGRS)</li><li>Ordnance Survey National Grid (OSNG)</li><li>Universal Transverse Mercator (UTM)</li></ul><br>This operation will not work offline.";
25-
this.infoURL = "https://foundation.wikimedia.org/wiki/Maps_Terms_of_Use";
26+
this.infoURL = "https://osmfoundation.org/wiki/Terms_of_Use";
2627
this.inputType = "string";
2728
this.outputType = "string";
2829
this.presentType = "html";
@@ -85,10 +86,10 @@ class ShowOnMap extends Operation {
8586
data = "0, 0";
8687
}
8788
const zoomLevel = args[0];
88-
const tileUrl = "https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png",
89-
tileAttribution = "<a href=\"https://wikimediafoundation.org/wiki/Maps_Terms_of_Use\">Wikimedia maps</a> | &copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors",
90-
leafletUrl = "https://unpkg.com/leaflet@1.5.0/dist/leaflet.js",
91-
leafletCssUrl = "https://unpkg.com/leaflet@1.5.0/dist/leaflet.css";
89+
const tileUrl = "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
90+
tileAttribution = "&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors",
91+
leafletUrl = "https://unpkg.com/leaflet@1.9.4/dist/leaflet.js",
92+
leafletCssUrl = "https://unpkg.com/leaflet@1.9.4/dist/leaflet.css";
9293
return `<link rel="stylesheet" href="${leafletCssUrl}" crossorigin=""/>
9394
<style>
9495
#output-text .cm-content,

0 commit comments

Comments
 (0)