Asanka Senavirathna
Asanka Senavirathna

Reputation: 4730

Android map api-2 disable click

I'm in the middle of migrating one of my app to the Android map V2. I'm showing a marker on the map and don't want to send touch events to the map to change the position/zoom level etc. in the earlier version, i was able to disable touch by setting android:clickable="false" in the MapView . how can i do the same thing in the Android map V2?

Upvotes: 7

Views: 7561

Answers (2)

S.Prapagorn
S.Prapagorn

Reputation: 631

yourmap.getUiSettings().setAllGesturesEnabled(false);

Upvotes: 25

Asanka Senavirathna
Asanka Senavirathna

Reputation: 4730

Figured it out myself.

mMapFragment.getView().setClickable(false);

Upvotes: 23

Related Questions