You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constmap=newmapboxgl.Map({container: 'map',style: 'mapbox://styles/mapbox/streets-v9',projection: 'globe',// Display the map as a globe, since satellite-v9 defaults to Mercatorzoom: 1,maxZoom: 0,center: [30,15]});
Maximum zoom level 0 should be accepted as any other possible levels: user should not zoom in beyond this level.
Actual Behavior
maxZoom is ignored like there is no value at all.
Possible solution
Most likely, the existence of a property is checked with simple JS if (property) code. It will produce false for 0. Additional check on 0 value should work: if (property || property === 0).
Temporal workaround
Set maxZoom to 0.0001. It should pass existence check and then it will be rounded to 0.
The text was updated successfully, but these errors were encountered:
mapbox-gl-js version: 3.9.0
browser: Chrome 131.0.6778.205
Steps to Trigger Behavior
maxZoom
to0
:Link to Demonstration
https://jsfiddle.net/7em46qau/2/
Expected Behavior
Maximum zoom level 0 should be accepted as any other possible levels: user should not zoom in beyond this level.
Actual Behavior
maxZoom
is ignored like there is no value at all.Possible solution
Most likely, the existence of a property is checked with simple JS
if (property)
code. It will produce false for0
. Additional check on0
value should work:if (property || property === 0)
.Temporal workaround
Set
maxZoom
to0.0001
. It should pass existence check and then it will be rounded to0
.The text was updated successfully, but these errors were encountered: