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
Bug report. The flyTo() functionality doesn't perform a sanity check on the requested zoom, so that a user can zoom past the map's maxZoom.
The final zoom level is the map's maxZoom, but the map center jumps to an arbitrary location.
Minimal reproducible case:
<divid='map'></div><buttonid='fly'>Fly!</button><script>varmap=newmapboxgl.Map({container: 'map',style: 'mapbox://styles/mapbox/streets-v9',center: [0,0],zoom: 0});fly.addEventListener('click',()=>{map.flyTo({center: [10.39170933059438,63.4309997568285],zoom: 22.5// 22.5 is greater than the default maxZoom of 20})});</script>
I've put that code in a jsbin over here. That jsbin uses v0.37.0.
Expected behaviour: final state of the map's camera would be zoom = map's maxzoom, center ≃ [10.39, 63.43].
Actual behaviour: final state of the map's camera would be zoom = map's maxzoom, center ≃ [89.25, 38.99] (more than 10000km away from expected center).
The text was updated successfully, but these errors were encountered:
Bug report. The
flyTo()
functionality doesn't perform a sanity check on the requested zoom, so that a user can zoom past the map'smaxZoom
.The final zoom level is the map's
maxZoom
, but the map center jumps to an arbitrary location.Minimal reproducible case:
I've put that code in a jsbin over here. That jsbin uses v0.37.0.
Expected behaviour: final state of the map's camera would be zoom = map's maxzoom, center ≃ [10.39, 63.43].
Actual behaviour: final state of the map's camera would be zoom = map's maxzoom, center ≃ [89.25, 38.99] (more than 10000km away from expected center).
The text was updated successfully, but these errors were encountered: