Hi all experts,
I'm having some problems with googlemaps
1. use gmap_CameraChange to put a marker in the middle of the map and so the user moves it to where you want (see photo 1), the problem is when I put a map on another page the pointer moves down and I do not know why, I use the same code (see photo2)
2. I use GetDirections of this thread https://www.b4x.com/android/forum/threads/b4x-google-geocoding-rest-api.83870/#content, the only thing I need is to work with JavaObject in b4i but I can not find a library or how to replace the last sub
I thank you very much for any help and for your time
I'm having some problems with googlemaps
1. use gmap_CameraChange to put a marker in the middle of the map and so the user moves it to where you want (see photo 1), the problem is when I put a map on another page the pointer moves down and I do not know why, I use the same code (see photo2)
B4X:
Sub gmap_CameraChange (Position As CameraPosition)
MapScale1.Update(Position.Zoom, Position.Target.Latitude)
Dim ll As LatLng
ll.Initialize(Position.Target.Latitude,Position.Target.Longitude)
amarker.Position=ll
End Sub
2. I use GetDirections of this thread https://www.b4x.com/android/forum/threads/b4x-google-geocoding-rest-api.83870/#content, the only thing I need is to work with JavaObject in b4i but I can not find a library or how to replace the last sub
B4X:
Sub drawDirections
Dim jo As JavaObject
Dim Points As List
Points.Initialize
jo.InitializeContext
Points = jo.RunMethod("decodePoly", Array(polyPoints))
If Points.Size > 0 Then
pline = gmap.AddPolyline
pline.Points = Points
pline.Color = Colors.Black
End If
End Sub