Wait For MapFragment1_Ready
GoogleMap1 = MapFragment1.GetMap
Dim MapStyle As String = $"[{"featureType":"poi","stylers":[{"visibility": "off"}]}]"$
SetGoogleMapStyle(GoogleMap1, MapStyle)
B4X:
Public Sub SetGoogleMapStyle(mGoogleMap As GoogleMap, mMapStyle As String) As Boolean
Dim jo As JavaObject = mGoogleMap
Dim style As JavaObject
style.InitializeNewInstance("com.google.android.gms.maps.model.MapStyleOptions", Array(mMapStyle))
Return jo.RunMethod("setMapStyle", Array(style))
End Sub
Wait For MapFragment1_Ready
GoogleMap1 = MapFragment1.GetMap
Dim MapStyle As String = $"[{"featureType":"poi","stylers":[{"visibility": "off"}]}]"$
SetGoogleMapStyle(GoogleMap1, MapStyle)
B4X:
Public Sub SetGoogleMapStyle(mGoogleMap As GoogleMap, mMapStyle As String) As Boolean
Dim jo As JavaObject = mGoogleMap
Dim style As JavaObject
style.InitializeNewInstance("com.google.android.gms.maps.model.MapStyleOptions", Array(mMapStyle))
Return jo.RunMethod("setMapStyle", Array(style))
End Sub