I'm using google map that implemented Clustering marker inside. However, my markers has been overlaid by User's current location icon like Image below
this is my code:
protected void onBeforeClusterRendered(Cluster<CurationLocation> cluster, MarkerOptions markerOptions) {
if (isAdded()) {
final Drawable clusterIcon = getResources().getDrawable(R.drawable.oval_bg);
mClusterIconGenerator.setBackground(clusterIcon);
mClusterIconGenerator.setTextAppearance(R.style.AppTheme_WhiteTextAppearance);
LayoutInflater myInflater = (LayoutInflater) mActivity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View clusterView = myInflater.inflate(R.layout.customize_cluster_layout, null, false);
mClusterIconGenerator.setContentView(clusterView);
final Bitmap icon = mClusterIconGenerator.makeIcon(String.valueOf(cluster.getSize()));
markerOptions.icon(BitmapDescriptorFactory.fromBitmap(icon));
} else {
return;
}
}
this is XML part:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:layout_centerInParent="true"
android:layout_centerVertical="true"
android:orientation="vertical"
android:weightSum="1">
<TextView
android:id="@+id/text"
android:layout_width="30dp"
android:layout_height="40dp"
android:background="@drawable/icon_location_clustering"
android:gravity="center_horizontal"
android:paddingTop="5dp"
android:text="33"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="#000000"
android:textSize="13sp" />
I want my markers should overlay User's current location icon. Can anybody help me?