Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] #3244 - Logging bearing / direction data from animateCamera
Browse files Browse the repository at this point in the history
  • Loading branch information
bleege committed Dec 17, 2015
1 parent 4912984 commit 19ab8d5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,7 @@ public void setTilt(Double pitch, @Nullable Long duration) {
@FloatRange(from = 0, to = 360)
public double getDirection() {
double direction = -mNativeMapView.getBearing();
Log.i(TAG, "direction = " + direction);

while (direction > 360) {
direction -= 360;
Expand All @@ -1213,6 +1214,8 @@ public double getDirection() {
direction += 360;
}

Log.i(TAG, "final direction = " + direction);

return direction;
}

Expand Down Expand Up @@ -1524,6 +1527,7 @@ public final void animateCamera (CameraUpdate update, int durationMs, MapView.Ca
if (update.getBearing() >= 0) {
angle = (-update.getBearing()) * MathConstants.DEG2RAD;
}
Log.i(TAG, "CameraOptions.getBearing() == " + update.getBearing() + "; angle = " + angle);
double pitch = -1;
if (update.getTilt() >= 0) {
double dp = MathUtils.clamp(update.getTilt(), MINIMUM_TILT, MAXIMUM_TILT);
Expand Down

0 comments on commit 19ab8d5

Please sign in to comment.