0

I am new in android studio, I am using google map fragment inside a fragment. i need to zoom exactly on center everytime when double tap on map. in eclise i used MApView and intercept double tap but i dont know what will i do in android studio.

This is my map fragment.

                <fragment
                android:id="@+id/maptrip"
                android:name="com.google.android.gms.maps.MapFragment"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />

Please any one help me out. Thank you.

sunil
  • 796
  • 1
  • 8
  • 28

1 Answers1

0

Use Double Click Listener in your MapActivity or Activity where you implement GoogleMap.This Blog might be helpful for you. Click Here

Sniffer
  • 23
  • 4
  • Use this mehtod... `GoogleMap map=mapView.getMap(); map.getUiSettings().setZoomGesturesEnabled(true);` – Sniffer Jan 12 '17 at 06:51
  • I'm not using MapView anywhere. I am usign latest compile 'com.google.android.gms:play-services:10.0.+' – sunil Jan 12 '17 at 06:57
  • in this MapView deprecated – sunil Jan 12 '17 at 06:58
  • Sunil. Use Mapfragment or Mapview.. You must be use GoogleMap variable for certain methods like zoom . or you can change the version of your library to 9.0.1 instead of 10.0.1. its not effecting to you code or map . – Sniffer Jan 12 '17 at 07:06