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.

[android]Bug onMarkerClick(Marker marker, View view, MarkerViewAdapter adapter) #8802

Closed

Description

@Larnoo

Platform: Android
Mapbox SDK version: v5.0.2 release

Steps to trigger behavior

  1. add a default MarkerView

    @Override
    public void onMapReady(MapboxMap mapboxMap) {
        mapboxMap.getMarkerViewManager().setOnMarkerViewClickListener(this);

        mapboxMap.addMarker(new MarkerViewOptions().position(new LatLng(38, 118)));
    }

    @Override
    public boolean onMarkerClick(@NonNull Marker marker, @NonNull View view, @NonNull MapboxMap.MarkerViewAdapter adapter) {
        Log.i(TAG, "onMarkerClick() called with: marker = [" + marker + "], view = [" + view + "], adapter = [" + adapter + "]");
        return true;
    }
  1. I click MarkerView, but onMarkerClick method is called twice.
  2. the log is as follow.
04-24 17:37:01.094 I/MainActivity: onMarkerClick() called with: marker = [MarkerView [position[LatLng [latitude=38.0, longitude=118.0, altitude=0.0]]]], view = [android.widget.ImageView{6ddeb30 V.ED..... ........ 0,0-50,80 #7f0e0046 app:id/image}], adapter = [com.mapbox.mapboxsdk.annotations.MarkerViewManager$ImageMarkerViewAdapter@145f3a9]
04-24 17:37:01.095 I/MainActivity: onMarkerClick() called with: marker = [MarkerView [position[LatLng [latitude=38.0, longitude=118.0, altitude=0.0]]]], view = [android.widget.ImageView{6ddeb30 V.ED..... ........ 0,0-50,80 #7f0e0046 app:id/image}], adapter = [com.mapbox.mapboxsdk.annotations.MarkerViewManager$ImageMarkerViewAdapter@145f3a9]

Activity

  1. changed the title [-][android] onMarkerClick(Marker marker, View view, MarkerViewAdapter adapter)[/-] [+][android]Bug onMarkerClick(Marker marker, View view, MarkerViewAdapter adapter)[/+] on Apr 24, 2017
  2. added
    Android
    on Apr 24, 2017
  3. added this to the android-v5.1.0 milestone on Apr 24, 2017
  4. self-assigned this
    on Apr 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Androidbug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions