misc: let leaflet zoom up to level 19 (#16715)
This commit is contained in:
parent
ddaf734dcd
commit
096ae1b5fd
|
@ -9,7 +9,11 @@ $(window).on('load', function() {
|
|||
map_options.zoom = 13;
|
||||
}
|
||||
var max_zoom = parseInt($map_widget.data('max_zoom'));
|
||||
if (! isNaN(max_zoom)) map_options.maxZoom = max_zoom;
|
||||
if (! isNaN(max_zoom)) {
|
||||
map_options.maxZoom = max_zoom;
|
||||
} else {
|
||||
map_options.maxZoom = 19;
|
||||
}
|
||||
var min_zoom = parseInt($map_widget.data('min_zoom'));
|
||||
if (! isNaN(min_zoom)) map_options.minZoom = min_zoom;
|
||||
var map_tile_urltemplate = $map_widget.data('tile-urltemplate');
|
||||
|
@ -30,7 +34,10 @@ $(window).on('load', function() {
|
|||
latlng = [50.84, 4.36];
|
||||
}
|
||||
map.setView(latlng, map_options.zoom);
|
||||
L.tileLayer(map_tile_urltemplate, {attribution: map_attribution}).addTo(map);
|
||||
L.tileLayer(map_tile_urltemplate, {
|
||||
attribution: map_attribution,
|
||||
maxZoom: map_options.maxZoom
|
||||
}).addTo(map);
|
||||
if (! $map_widget.data('readonly')) {
|
||||
map.on('click', function(e) {
|
||||
$map_widget.trigger('set-geolocation', e.latlng);
|
||||
|
|
Loading…
Reference in New Issue