mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

FitBounds doesnt work on a lambert conformal conic projection

Open SourceCipher opened this issue 2 years ago • 0 comments

mapbox-gl-js version: 2.15.0

browser: Brave Version 1.58.131 Chromium: 117.0.5938.92

Steps to Trigger Behavior

  1. Go to the provided demonstration link
  2. Click anywhere on the map to zoom to features bounds (and it will work fine)
  3. Now uncomment the part with projection next top the map variable
  4. 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

SourceCipher avatar Sep 28 '23 14:09 SourceCipher