mapbox-gl-js
mapbox-gl-js copied to clipboard
Equirectangular projection jumps when `render-world-copies` is false.
mapbox-gl-js version: main
browser: Chrome and Firefox
Steps to Trigger Behavior
- Make a map with
projection:'equirectangular'
- setRenderWorldCopies(false)` 2 Pan off left edge of map.
https://user-images.githubusercontent.com/14878684/201788289-6b51b01e-d28e-4f23-bcd2-8d63df155135.mov
Expected Behavior
Map should stop moving on the left side, as does Mercator
Actual Behavior
Map jumps to the right.
This is probably caused by equirectangular
using the same code paths as non-rectangular projections to determine where to snap. Using the same behavior as Mercator should solve this issue.
Maybe related to https://github.com/mapbox/mapbox-gl-js/issues/11406