Skip to content

Commit

Permalink
Use milliseconds for duration in Marker setPointEased
Browse files Browse the repository at this point in the history
  • Loading branch information
matteblair committed Feb 14, 2017
1 parent 6449a89 commit 84ded3e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -920,10 +920,11 @@ boolean setMarkerPoint(long markerId, double lng, double lat) {
return nativeMarkerSetPoint(mapPointer, markerId, lng, lat);
}

boolean setMarkerPointEased(long markerId, double lng, double lat, float duration, EaseType ease) {
boolean setMarkerPointEased(long markerId, double lng, double lat, int duration, EaseType ease) {
checkPointer(mapPointer);
checkId(markerId);
return nativeMarkerSetPointEased(mapPointer, markerId, lng, lat, duration, ease.ordinal());
float seconds = duration / 1000.f;
return nativeMarkerSetPointEased(mapPointer, markerId, lng, lat, seconds, ease.ordinal());
}

boolean setMarkerPolyline(long markerId, double[] coordinates, int count) {
Expand Down
4 changes: 2 additions & 2 deletions android/tangram/src/main/java/com/mapzen/tangram/Marker.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ public boolean setPoint(LngLat point) {
/**
* Sets the coordinate location, where the marker should be displayed with animation.
* @param point lat/lng location
* @param duration animation duration
* @param duration animation duration in milliseconds
* @param ease animation type
* @return whether the point was successfully set
*/
public boolean setPointEased(LngLat point, float duration, MapController.EaseType ease) {
public boolean setPointEased(LngLat point, int duration, MapController.EaseType ease) {
if (point == null) {
return false;
}
Expand Down

0 comments on commit 84ded3e

Please sign in to comment.