Use OSM tiles in Geolocation plugin #5466
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>
This commit is contained in:
parent
9650aa394b
commit
441fee1a72
@ -30,13 +30,11 @@ $(document).ready(function () {
|
|||||||
// Get a new map instance attached and element with id="tile-map"
|
// Get a new map instance attached and element with id="tile-map"
|
||||||
var map = new L.Map('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 mqtileAttrib = '<a id="osm_license_link">see map license</a>';
|
||||||
var mqtile = new L.TileLayer(
|
var mqtile = new L.TileLayer(
|
||||||
mqtileUrl,
|
mqtileUrl,
|
||||||
{maxZoom: 18,
|
{maxZoom: 18});
|
||||||
attribution: mqtileAttrib,
|
|
||||||
subdomains: '1234'});
|
|
||||||
|
|
||||||
map.attributionControl.setPrefix('');
|
map.attributionControl.setPrefix('');
|
||||||
var location = new L.LatLng(latitude, longitude);
|
var location = new L.LatLng(latitude, longitude);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user