Sub FusedLocationProvider1_LocationChanged(Location1 As Location)
Log($"FusedLocationProvider1_LocationChanged(GMap initialized = ${gmap.IsInitialized})"$)
LastLocation=Location1
If gmap.IsInitialized = False Then
ToastMessageShow("Error initializing map.", True)
Else
Log($"Changing marker-position to Lat: ${Location1.Latitude}, Lon: ${Location1.Longitude}"$)
m1.Title = "Location"
m1.Snippet=$"Lat: ${Location1.Latitude} Lon: ${Location1.Longitude}"$
m1.InfoWindowShown=True
Dim LaLo As LatLng
LaLo.Initialize(Location1.Latitude,Location1.Longitude)
m1.Position = LaLo 'new Position
Dim cp As CameraPosition
cp.Initialize(Location1.Latitude, Location1.Longitude, 14)
gmap.AnimateCamera(cp)
gmap.MyLocationEnabled=True
End If
End Sub