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.

Improve View synchronisation #8224

Closed
Closed

Description

@tobrun

The Android SDK includes multiple features that show and synchronises an Android SDK view on top of the map. Some examples of such features are:

  • MarkerView
  • InfoWindow
  • MyLocationView

Our current setup uses mapboxMap.getProjection().toScreenLocation(position) to convert the position on the map to an actual screen coordinate. Afterwards we update the view with View.setX(x) and View.setY(y). While this setup works, it introduces some kind of jiggling/wiggling on the view as the view is trying to catch up with the camera transformations.

This issue primarily focusses on improving view synchronisation for gestures. The idea is to decouple the system of toScreenLocation and try to be smarter when dispatching updates. We could for example, for the pan gesture update the View directly with x,y from moveBy instead of relying on toScreenLocation.

Side note here is that this setup worked pretty well with our TextureView implementation but since a couple of releases we have moved rendering to a SurfaceView implementation. We haven't revisited our view synchronisation since that change.

Activity

  1. added
    Android
    on Feb 28, 2017
  2. tobrun commented on Mar 1, 2017

    @tobrun
    MemberAuthor

    Even with the adding the approach mentioned in OP, I'm still seeing the View "jiggle", going to revisit the way we apply the transformation (currently with setX and setY).

  3. wbinarytree commented on Mar 6, 2017

    @wbinarytree

    Any progress for this issue?

  4. tobrun commented on Apr 19, 2017

    @tobrun
    MemberAuthor

    General thinking around this issue is that we will start introducing plugins and all view synchronisation will be removed from the SDK with a major Semver. Non actionable for now. Closing.

  5. wbinarytree commented on Apr 26, 2017

    @wbinarytree

    For MarkerView can be replaced by Marker without any drifting issue. Bus as for InfoWindow, is there a way to style an InforWindow via some other component like Layers? Thanks.
    For now I just convert my Custom InfoWindow into a bitmap and pass to Symbol layer. Not really good for performance I guess :(.

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

    Android

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions