Closed vcoppe closed 3 years ago
it is possible to zoom in infinitely on the maps even when maxZoom is specified.
setting maxZoom
on the map already works just fine.
var map = L.map('map', { maxZoom: 19 }).setView([38.9, -77], 15);
var gl = L.mapboxGL(/* */).addTo(map);
this change is to allow for setting the property on the mapboxGL layer, correct?
var gl = L.mapboxGL({ maxZoom: 19 }).addTo(map);
if so, in your application are you juggling multiple GL layers that you'd like to display with different maximum resolutions?
this change is to allow for setting the property on the mapboxGL layer, correct?
Yes indeed.
if so, in your application are you juggling multiple GL layers that you'd like to display with different maximum resolutions?
Yes, for example when using layers with 256 and 512 pixels tiles in the same map.
sounds reasonable to me. thanks for the contribution!
Currently, it is possible to zoom in infinitely on the maps even when maxZoom is specified. I have now included the zoom limits with an existing L.Layer function when the layer is added.