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

flyTo does not check the value of transform.renderWorldCopies

Open huaruiw opened this issue 9 years ago • 2 comments

mapbox-gl-js version: v0.34.0

Steps to Trigger Behavior

  1. initialize a map and set option.renderWorldCopies = false
  2. try to do a flyTo where Math.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

huaruiw avatar Mar 18 '17 19:03 huaruiw

@huaruiwu I encourage you to submit this is a PR. Your fix looks good to me!

andrewharvey avatar Mar 20 '17 09:03 andrewharvey

Fixed in 9941dde7e8f769f01917f3fc06b80a4d46c20422

andrewharvey avatar Mar 22 '17 22:03 andrewharvey