mapbox-gl-js
mapbox-gl-js copied to clipboard
flyTo does not check the value of transform.renderWorldCopies
mapbox-gl-js version: v0.34.0
Steps to Trigger Behavior
- initialize a map and set
option.renderWorldCopies = false - try to do a
flyTowhereMath.abs(tr.center.lng) + Math.abs(center.lng) > 180
Expected Behavior
flyTo should stay in the noncopied world where -180 < lat < 180.
Actual Behavior
flyTo will to to bring you to a worldCopy which is not rendered.
Something like this will fix the problem. https://github.com/huaruiwu/mapbox-gl-js/commit/4baab4a23528098fe9563d80483b5367dd6b3aea
@huaruiwu I encourage you to submit this is a PR. Your fix looks good to me!
Fixed in 9941dde7e8f769f01917f3fc06b80a4d46c20422