mapbox-gl-js
mapbox-gl-js copied to clipboard
FitBounds doesnt work on a lambert conformal conic projection
mapbox-gl-js version: 2.15.0
browser: Brave Version 1.58.131 Chromium: 117.0.5938.92
Steps to Trigger Behavior
- Go to the provided demonstration link
- Click anywhere on the map to zoom to features bounds (and it will work fine)
- Now uncomment the part with projection next top the map variable
- Save the changes and try to click on the map to zoom to a feature again (this will not work and it will zoom to the ocean)
Link to Demonstration
https://codepen.io/gmand/pen/gOZKgxv
Expected Behavior
In any map projections, fit to bounds should work as expected
Actual Behavior
With lambertConformalConic projection, bounds of specified feature zooms in to the ocean