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

TransitionOptions conversion when set #8575

Closed
tobrun opened this issue Mar 30, 2017 · 1 comment
Closed

TransitionOptions conversion when set #8575

tobrun opened this issue Mar 30, 2017 · 1 comment
Labels
Android Mapbox Maps SDK for Android bug

Comments

@tobrun
Copy link
Member

tobrun commented Mar 30, 2017

When looking into adding transition properties for layer attributes in #8015. I noticed that the style wide configuration of TransitionOptions in #7711 is not returning the same values as the value set. Eg. following test is failing:

long transitionDuration = 1;
mapboxMap.setTransitionDuration(transitionDuration);
assertEquals("TransitionDuration should match", transitionDuration, mapboxMap.getTransitionDuration(), 0);

with

AssertionFailedWithCauseError: TransitionDuration should match expected:<1.0> but was:<1.0E9>

Looking at the style specification, it seems that the unit should be in milliseconds while it nows seems to be set in seconds and returned in nano seconds.

@tobrun tobrun added Android Mapbox Maps SDK for Android bug labels Mar 30, 2017
@tobrun tobrun added this to the android-v5.1.0 milestone Mar 30, 2017
@1ec5
Copy link
Contributor

1ec5 commented Mar 30, 2017

it seems that the unit should be in milliseconds while it nows seems to be set in seconds and returned in nano seconds.

The intention was to match the expected time unit on the platform, regardless of the style specification’s units. On iOS and macOS, the expected unit would be seconds. It looks like the Android implementation suffered from a similar issue as #8264, which was subsequently fixed on iOS and macOS by correctly round-tripping seconds values.

/cc @incanus

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android bug
Projects
None yet
Development

No branches or pull requests

2 participants