Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent rotation of markers on google map in android

I am using google map and added several custom markers.

My problem is when i rotate my map using fingers, my markers are also rotated.

Can any one give me suggestion, how can i prevent rotation for markers?

Thanks in advance.

like image 687
Jatin Avatar asked Nov 23 '25 01:11

Jatin


1 Answers

I found answer my self and posting answer so it can help to others.

Just set marker's flat property to false will prevent rotation of marker.

  MY_MARKER = mMap.addMarker(new MarkerOptions()
                    .flat(false)
like image 198
Jatin Avatar answered Nov 24 '25 15:11

Jatin