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

TransitionOptions conversion when set #8575

Closed

Description

@tobrun

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.

Activity

  1. added
    Android
    on Mar 30, 2017
  2. added this to the android-v5.1.0 milestone on Mar 30, 2017
  3. 1ec5 commented on Mar 30, 2017

    @1ec5
    Contributor

    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 join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Androidbug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions