B4J Question Using a map to remove a Marker from GoogleMaps

Declan

Well-Known Member
Licensed User
Longtime User
I am using the following code to display a Marker on GoogleMaps:
B4X:
            Dim cp As CameraPosition
            cp.Initialize(myLat, myLon, 16)
            mkr = GMap.AddMarker2(myLat, myLon, markerTxt,File.GetUri(File.DirAssets, "othermark.png"))
            GMap.MoveCamera(cp)
            mapMarkers.Put(myFriendname, mkr)
I write the Device unique ID "myFriendname" as the Key of mapMarkers map and marker details as the Value of mapMarkers.
I must now remove the Marker from the GoogleMaps using:
B4X:
GMap.RemoveMarker(m)
Where m is the Marker displayed on GoogleMaps.
 
Top