Lena Bru
Lena Bru

Reputation: 13947

Display my location marker above all others

I am using google maps in my android app, and I wanted to use a custom myLocation marker I need it to be on top of the other markers, how can make it be on top ?

Upvotes: 2

Views: 683

Answers (1)

Sukhbir
Sukhbir

Reputation: 1608

Try below code, it helped me to show marker above to all other markers

 mMap.addMarker(new MarkerOptions()
.position(mLatLng)
.title("" + name)
.snippet("" + pingDate)
.icon(BitmapDescriptorFactory.fromBitmap(icon))
.zIndex(yourZIndex));

Here is screenshot of my application

enter image description here

Upvotes: 2

Related Questions