Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

distinguish the tapped marker from other markers #408

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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