Android Question [Solved] Remove Points Of Interest in Google Maps

GGSoft

Member
Licensed User
Longtime User
Is it possible to remove the markers of the points of interest in Google Maps so that only the markers that I add appear?
 

TILogistic

Expert
Licensed User
Longtime User
B4X:
    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
 
Last edited:
Upvote 0

GGSoft

Member
Licensed User
Longtime User
Works great. Thanks again.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…