[all] Make LatLng coordinates read-only

This commit is contained in:
John Firebaugh
2017-04-04 07:35:26 -07:00
parent a261f7ff53
commit 16a2839e23
21 changed files with 232 additions and 229 deletions

View File

@@ -103,7 +103,9 @@ void Transform::easeTo(const CameraOptions& camera, const AnimationOptions& anim
// If gesture in progress, we transfer the world rounds from the end
// longitude into start, so we can guarantee the "scroll effect" of rounding
// the world while assuring the end longitude remains wrapped.
if (isGestureInProgress()) startLatLng.longitude -= unwrappedLatLng.longitude - latLng.longitude;
if (isGestureInProgress()) {
startLatLng = LatLng(startLatLng.latitude(), startLatLng.longitude() - (unwrappedLatLng.longitude() - latLng.longitude()));
}
// Find the shortest path otherwise.
else startLatLng.unwrapForShortestPath(latLng);