Hey I'm trying to open maps from my app and to set already the coordinates.
Starting from point A ( My gps location ) to a point B.
I found this @Erel code
Erel Code
but I don't know how to set the point B in this code..
I found this code
but to be honest, I don't know how to implement both together..
Thanks
Starting from point A ( My gps location ) to a point B.
I found this @Erel code
Erel Code
B4X:
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
Wait For MapFragment1_Ready
gmap = MapFragment1.GetMap
If gmap.IsInitialized Then
Do While gmap.MyLocation.IsInitialized = False
Sleep(100)
Loop
Dim cp As CameraPosition
cp.Initialize(gmap.MyLocation.Latitude, gmap.MyLocation.Longitude, 5)
gmap.MoveCamera(cp)
End If
End Sub
but I don't know how to set the point B in this code..
I found this code
B4X:
Private i As Intent
Private city As String
Private province As String
Private street As String
Private HouseNumber As String
Private MapURL As String
city = "Milano"
province = "MI"
street = "Via Manzoni"
HouseNumber = "10"
MapURL = "http://maps.google.com/maps?saddr=" & city & "," & province & ",&daddr=" & street & " " & HouseNumber
i.Initialize(i.ACTION_VIEW, MapURL)
i.SetComponent("com.google.android.apps.maps/com.google.android.maps.MapsActivity")
StartActivity(I)
but to be honest, I don't know how to implement both together..
Thanks