Use OSM tiles in Geolocation plugin #5466
authorOlivier Mehani <shtrom@ssji.net>
Wed, 31 Aug 2016 12:20:53 +0000 (22:20 +1000)
committerBoris Bobrov <breton@cynicmansion.ru>
Sun, 18 Sep 2016 14:01:16 +0000 (17:01 +0300)
MapQuest recently disabled free-as-in-beer access to their map tiles, so let's
switch to free-as-in-speech images.

Signed-off-by: Olivier Mehani <shtrom@ssji.net>
mediagoblin/static/js/geolocation-map.js

index 26d94c5d844ec86a461946036e044f26b95d878f..c30788f77caa94c389d41ae0901c2e40c3ec35e5 100644 (file)
@@ -30,13 +30,11 @@ $(document).ready(function () {
     // Get a new map instance attached and element with id="tile-map"
     var map = new L.Map('tile-map');
 
-    var mqtileUrl = 'http://otile{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.jpg';
+    var mqtileUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
     var mqtileAttrib = '<a id="osm_license_link">see map license</a>';
     var mqtile = new L.TileLayer(
        mqtileUrl,
-       {maxZoom: 18,
-        attribution: mqtileAttrib,
-        subdomains: '1234'});
+       {maxZoom: 18});
 
     map.attributionControl.setPrefix('');
     var location = new L.LatLng(latitude, longitude);