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.

Select marker view annotation not working properly #5384

Closed

Description

@cammace

When calling MapboxMap.selectMarker() on a view annotation the info window isn't placed above the marker like it is when you click the marker yourself:

2016-06-16 16_56_01

cc: @tobrun @zugaldia @ivovandongen @bleege

Activity

  1. added
    Android
    on Jun 16, 2016
  2. added this to the android-v4.1.0 milestone on Jun 16, 2016
  3. tobrun commented on Jun 17, 2016

    @tobrun
    Member

    @cammace I guess the ViewMarker is not measured yet and thus resulting in a offset of {0,0}.
    From end user perspective there are two workarounds:

    • global layout change listener
    • delaying the selectMarker call with something as a Handler
  4. cammace commented on Jun 17, 2016

    @cammace
    ContributorAuthor

    delaying the selectMarker call with something as a Handler

    selectMarker was already being called after a short delay (in the geocoding onResponse) but I added a handler anyways and the problem still persist.

    final Handler handler = new Handler();
    handler.postDelayed(new Runnable() {
        @Override
        public void run() {
            map.selectMarker(droppedMarker);
        }
    }, 500);
  5. tobrun commented on Jun 17, 2016

    @tobrun
    Member

    @ivovandongen is investigating this and it's correct that delaying does not resolve it.
    We need to migrate code from the internal onClick listener to the selectMarker method.

  6. ivovandongen commented on Jun 17, 2016

    @ivovandongen
    Contributor

    @cammace Found the problem. Is coming together with #5282

  7. zugaldia commented on Jun 17, 2016

    @zugaldia
    Member

    @cammace The PR has now landed via #5391, please reopen if you still observe this issue happening in the release branch.

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