Browse Source

map: Increase maximum amount of zoom

Baptiste Jonglez 7 years ago
parent
commit
dff0df7a6e

+ 1 - 1
panorama/static/panorama/js/pano.js

@@ -1245,7 +1245,7 @@ function load_map(){
     // create the tile layer with correct attribution
     var osmUrl='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
     var osmAttrib='Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
-    var osm = new L.TileLayer(osmUrl, {attribution: osmAttrib});
+    var osm = new L.TileLayer(osmUrl, {attribution: osmAttrib, maxZoom: 19});
     map.addLayer(osm);
     map.addLayer( markerClusters );
     map.addLayer(pointsOfInterest);

+ 1 - 1
panorama/templates/panorama/locate_point.html

@@ -108,7 +108,7 @@ style="padding:0px;height:calc(100vh - 50px)"
         // create the tile layer with correct attribution
         var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
         var osmAttrib = 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
-        var osm = new L.TileLayer(osmUrl, {attribution: osmAttrib});
+        var osm = new L.TileLayer(osmUrl, {attribution: osmAttrib, maxZoom: 19});
 
         // start the map on the point
         map.setView(new L.LatLng({{ located_point_lat }}, {{ located_point_lon }}),13);

+ 1 - 1
panorama/templates/panorama/main.html

@@ -190,7 +190,7 @@
             // create the tile layer with correct attribution
             var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
             var osmAttrib = 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors';
-            var osm = new L.TileLayer(osmUrl, {attribution: osmAttrib});
+            var osm = new L.TileLayer(osmUrl, {attribution: osmAttrib, maxZoom: 19});
     
             // start the map in Grenoble
             map.setView(new L.LatLng(45.1842, 5.7218),13);