Reputation: 69
I'm using Google Maps Android API Utility Library in order to show several markers in a map in a clustered way. I can't find a way to change default red marker to custom marker
Does anybody have any idea about this?
Thanks a lot in advance!
Upvotes: 2
Views: 2331
Reputation: 20500
In order to change the marker you need to override the onClusterItemRendered
method of your custom renderer.
Then change it like this:
@Override
protected void onClusterItemRendered(ListingCluster clusterItem, final Marker marker) {
super.onClusterItemRendered(clusterItem, marker);
try {
marker.setIcon(BitmapDescriptorFactory.fromResource(R.drawable.map_marker_detail));
} catch (Exception e) {
e.printStackTrace();
}
}
Upvotes: 2