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

Conformal south polar projection crashes with `failed to invert matrix`

Open danielfdsilva opened this issue 1 year ago • 1 comments

mapbox-gl-js version: 2.9.2

browser: any

Steps to Trigger Behavior

  1. Initialize a map with lambertConformalConic projection and parallels: [-90, -90]
new mapboxgl.Map({
      container,
      style: "mapbox://styles/mapbox/light-v9",
      center: [0, 0],
      zoom: 1,
      projection: {
        name: "lambertConformalConic",
        center: [40, 0],
        parallels: [-90, -90]
      }
    })

Link to Demonstration

https://codesandbox.io/s/agitated-pare-7rkj74?file=/src/App.js

Expected Behavior

Expected this to work as it is given as an example of Customize a conic projection to achieve a polar projection

Actual Behavior

App crashes

danielfdsilva avatar Aug 10 '22 11:08 danielfdsilva

This can also be reproduced by by selecting LambertConformalConic and tweaking the values in this example. Interestingly, Albers currently works fine. (@danielfdsilva perhaps you can use the other projection as a workaround until we resolve this?)

cc @ansis

SnailBones avatar Aug 10 '22 20:08 SnailBones