Skip to content

Commit

Permalink
make flyTo check if it can fly to worldCopies
Browse files Browse the repository at this point in the history
  • Loading branch information
CrokinoleMaster authored Mar 18, 2017
1 parent 6945214 commit 4baab4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ class Camera extends Evented {

// If a path crossing the antimeridian would be shorter, extend the final coordinate so that
// interpolating between the two endpoints will cross it.
if (Math.abs(tr.center.lng) + Math.abs(center.lng) > 180) {
if (tr._renderWorldCopies && Math.abs(tr.center.lng) + Math.abs(center.lng) > 180) {
if (tr.center.lng > 0 && center.lng < 0) {
center.lng += 360;
} else if (tr.center.lng < 0 && center.lng > 0) {
Expand Down

0 comments on commit 4baab4a

Please sign in to comment.