Android-maps-utils: How to change marker icon?

Created on 12 Feb 2015  路  3Comments  路  Source: googlemaps/android-maps-utils

i want to change default red marker which is showing in all markers. i want to set different markers for all items. how can i do that.?

stale

Most helpful comment

Hi @Slake07,

@Override
protected void onBeforeClusterItemRendered(MyItem item, MarkerOptions markerOptions) {
super.onBeforeClusterItemRendered(item, markerOptions);

        markerOptions.title(item.getTitle());

        BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.pin);

        markerOptions.icon(icon);

}

In this method you can change your marker.

All 3 comments

Hi @Slake07,

@Override
protected void onBeforeClusterItemRendered(MyItem item, MarkerOptions markerOptions) {
super.onBeforeClusterItemRendered(item, markerOptions);

        markerOptions.title(item.getTitle());

        BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.pin);

        markerOptions.icon(icon);

}

In this method you can change your marker.

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

Closing this. Please reopen if you believe it should be addressed. Thank you for your contribution.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

edumucelli picture edumucelli  路  5Comments

TatyanaRTB picture TatyanaRTB  路  3Comments

mengoni picture mengoni  路  4Comments

harold-hernandez30 picture harold-hernandez30  路  3Comments

patriotaSJ picture patriotaSJ  路  7Comments