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.

Add multiple markers and rotations to AnimatedMarkerActivity #5299

Closed

Description

@zugaldia

As mentioned in #5242 we currently have an experimental AnimatedMarkerActivity in the TestApp that animates a marker position using a ValueAnimator. We want to expand this activity to reflect common scenarios (e.g. a car marker), and create a concrete example that can help us profile the performance of different marker animations approaches.

In particular, we want to add the following elements:

Related sample in the same category: #5282.

/cc: @ivovandongen @tobrun @bleege @cammace

Activity

  1. zugaldia commented on Jun 9, 2016

    @zugaldia
    MemberAuthor
  2. added
    Android
    annotations
    on Jun 9, 2016
  3. added this to the android-v4.1.0 milestone on Jun 9, 2016
  4. ivovandongen commented on Jun 10, 2016

    @ivovandongen
    Contributor

    I've been trying some different combinations. Using both Markers and MarkerViews. All using ValueAnimators to move around the Markers. As expected, the results are not as smooth as we'd like. (This is all on a Nexus 5X)

    First off the MarkerViews

    One car:
    1car mp4
    Same thing, with gpu/cpu overlays
    1car-debug mp4

    10 cars
    10cars mp4
    10 cars, with gpu/cpu overlays
    10cars-debug mp4

  5. ivovandongen commented on Jun 10, 2016

    @ivovandongen
    Contributor

    Next up: the markers (GL).

    1 car
    1car-gl_marker mp4
    1 car, debug
    1car-gl_marker-debug mp4

    10 cars
    10cars-gl_marker mp4
    10 cars, debug
    10cars_gl_marker-debug mp4

    Results are very similar with to Android based View Markers.

  6. ivovandongen commented on Jun 10, 2016

    @ivovandongen
    Contributor

    Every step in the animation results in the following log statements btw:

    06-10 16:26:05.732 19469-19469/com.mapbox.mapboxsdk.testapp D/mbgl: [JNI]: nativeUpdateMarker
    06-10 16:26:05.780 19469-19469/com.mapbox.mapboxsdk.testapp D/mbgl: [Android]: NativeMapView::invalidate()
    06-10 16:26:05.784 19469-19469/com.mapbox.mapboxsdk.testapp D/mbgl: [Android]: NativeMapView::invalidate()
    06-10 16:26:05.785 19469-19469/com.mapbox.mapboxsdk.testapp D/mbgl: [Android]: NativeMapView::invalidate()
    

    Although not much needs to be done on the core side (mainly, calculating screen position from the new coordinates), it seems that a lot happens anyways.

  7. added 2 commits that reference this issue on Jun 10, 2016
  8. zugaldia commented on Jun 10, 2016

    @zugaldia
    MemberAuthor

    Great job @ivovandongen , this is great progress.

    Did you notice if any of the following had any lower/higher noticeable performance impact?

  9. tobrun commented on Jun 13, 2016

    @tobrun
    Member

    I'm going to run with this branch and try out proposed solution for this from #5242.

  10. tobrun commented on Jun 17, 2016

    @tobrun
    Member

    Merged with #5300 on release-android-v4.1.0

  11. AlejandroP27 commented on Dec 26, 2019

    @AlejandroP27

    Hello, I am very glad that I am a super rookie on the subject of Android, serious layers of telling me or explaining how you did to give movements to multiple markes if it is not much trouble. thank you very much

  12. zugaldia commented on Jan 2, 2020

    @zugaldia
    MemberAuthor

    Hi @AlejandroP27, thanks for using our Maps SDK. However, this is not a support forum — if you have more implementation questions, please check out our excellent help docs or post your question on Stack Overflow. Thanks!

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

    Androidannotations

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions