-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
- Xiaomi Mi 6, Android 9, MIUI Global 11.0.6
- Google Play Services version on the device: 21.02.14 (100408-352619232)
- Android SDK Version: Target SDK 28
- Google Maps Library version: 3.1.0-beta
I have problem with Google Maps V3. Basically I have application with HomeActivity (AppCompatActivity). In this activity I have HomeFragment (inherits from Fragment) and now what I want is to have SupportMapFragment from Google Maps library, so inside HomeFragment layout I put
<fragment android:id="@+id/map" android:name="com.google.android.libraries.maps.SupportMapFragment" android:layout_width="match_parent" android:layout_height="match_parent"/>
In HomeFragment onCreateView callback I have
mapFragment = childFragmentManager.findFragmentById(R.id.map) as SupportMapFragment mapFragment?.getMapAsync(this)
Map is showing, but the problem is I can't do anything - I mean I can't scroll or zoom this map, it is not responding.
I tried to put MapView instead of whole fragment and map was reacting to gestures. But this solution isn't perfect - for example isMyLocationEnabled doesn't show current location icon and click on button in right upper corner is not moving camera to location (yet callback is called).
Root element for HomeFragment xml is < layout >.