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

Equirectangular projection jumps when `render-world-copies` is false.

Open SnailBones opened this issue 2 years ago • 0 comments

mapbox-gl-js version: main

browser: Chrome and Firefox

Steps to Trigger Behavior

  1. Make a map with projection:'equirectangular'
  2. 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

SnailBones avatar Nov 14 '22 23:11 SnailBones