Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/mbgl/map/transform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ void Transform::flyTo(const CameraOptions &camera, const AnimationOptions &anima
/// Length of the flight path as projected onto the ground plane, measured
/// in pixels from the world image origin at the initial scale.
double u1 = ::hypot((endPoint - startPoint).x, (endPoint - startPoint).y);
//fix: if startpoint and endpoint are too close, we force the distance at 1 px
// otherwise r(x) could return inf
if (u1<0.5) {
u1 = 0.5;
}

/** ρ: The relative amount of zooming that takes place along the flight
path. A high value maximizes zooming for an exaggerated animation, while
Expand Down