I have a panel which has a MapFragment.
The following code displays the map, but the marker is not placed on the map?
The following code displays the map, but the marker is not placed on the map?
Code::
Sub OpenMap_Click
LoadMap("-25.855718", "28.179536", "5.1", "200C1BD")
End Sub
Sub LoadMap(Lat As String, Lon As String, Volts As String, deviceID As String)
pnlMap.Visible = True
Wait For MapFragment1_Ready
gmap = MapFragment1.GetMap
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
If Result Then
gmap.MyLocationEnabled = True
Else
Log("No permission!")
End If
gmap.AddMarker(Lat, Lon, "ALARM: " & deviceID & " " & Volts & "V")
Dim cp As CameraPosition
cp.Initialize(Lat, Lon, 15)
gmap.AnimateCamera(cp)
End Sub