Android Question Location

Almora

Well-Known Member
Licensed User
Longtime User
B4X:
Public Sub LocationChanged(Location1 AsLocation)Dim cp AsCameraPosition
cp.Initialize(Location1.Latitude, Location1.Longitude,14)
gmap.AnimateCamera(cp)
gmap.MyLocationEnabled=True
End Sub

I find the position on the map. But I can not go if I want to go somewhere else on the map. I'm back to the position again.
How can I navigate freely after finding my position?
Thnks..
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
if you dont want to get the event anymore. yes. If you just want to prevent google map changing the position to the gps position then you just need to prevent calling
B4X:
cp.Initialize(Location1.Latitude, Location1.Longitude,14)
gmap.AnimateCamera(cp)
this is the code which does center your map to the gps position.

It depends on your need
 
Upvote 0

Almora

Well-Known Member
Licensed User
Longtime User
I did not succeed. How will I free wander after finding the location on the map.
 
Last edited:
Upvote 0

Almora

Well-Known Member
Licensed User
Longtime User
B4X:
Public Sub LocationChanged(Location1 AsLocation)Dim cp AsCameraPosition
cp.Initialize(Location1.Latitude, Location1.Longitude,14)
gmap.AnimateCamera(cp)
gmap.MyLocationEnabled=True

if gmap.CameraPosition.Zoom=14 then
Dim cp1 As CameraPosition
cp1.Initialize(Location1.Latitude, Location1.Longitude,gmap.CameraPosition.Zoom)
gmap.AnimateCamera(cp1)
End Sub

This did not work.
 
Upvote 0
Top