Skip to content

distinguish the tapped marker from other markers#408

Open
dust27149 wants to merge 1 commit intoMKergall:masterfrom
dust27149:master
Open

distinguish the tapped marker from other markers#408
dust27149 wants to merge 1 commit intoMKergall:masterfrom
dust27149:master

Conversation

@dust27149
Copy link

A low-cost solution to distinguish the tapped marker from other markers with the help of onSingleTapUp & onSingleTapConfirmed method and drawable resources. Works in MarkerClusterer container as well.

Step1.

add drawable resources that can distinguish status from focused and other status;
marker_with_status.xml
`

<item android:drawable="@drawable/marker_default" android:state_focused="true" />
<item android:drawable="@drawable/marker_default_focused_base" />

`

Step2.

replace Marker with MarkerWithStatus, and call setIcon(Drawable icon) method;

MarkerWithStatus startMarker = new MarkerWithStatus(map); startMarker.setIcon(ContextCompat.getDrawable(this,R.drawable.marker_with_status));

…ingleTapUp & onSingleTapConfirmed method and drawable resources.Works in MarkerClusterer as well.
@Psijic
Copy link

Psijic commented Sep 25, 2023

Is there a way to show selected marker differently at the moment? The patch is useful.

@dust27149
Copy link
Author

dust27149 commented Oct 7, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants