Android Question Google maps route

AHilberink

Well-Known Member
Licensed User
Longtime User
Hi,

I want to try to integrate GoogleMaps for the use of routeplanning. I am on LatLonA and I want to LatLonB. When it's possible: Starting the default GoogleMapsApp is also fine.

Is this possible using one of GoogleMaps libraries and which one?

Best regards,
André
 
Starting the default GoogleMapsApp is also fine.
Code:
    Dim mapIntent As Intent
    Dim geouri As String = "google.navigation:q=Triererstrasse 36, Aachen" ' Route to address
    mapIntent.Initialize(mapIntent.ACTION_VIEW,geouri)
    mapIntent.WrapAsIntentChooser("Please choose App")
    StartActivity(mapIntent)

or

Code:
Dim in As Intent
   in.Initialize(in.ACTION_VIEW, $"google.navigation:q=${Latitude},${Longitude}"$)
   in.SetPackage("com.google.android.apps.maps") 'this method is only available in v8.8+. Example of calling it with JavaObject: https://www.b4x.com/android/forum/threads/inline-java-question.97866/#post-616946
   StartActivity(in)
End Sub
 
Upvote 0
Code:
    Dim mapIntent As Intent
    Dim geouri As String = "google.navigation:q=Triererstrasse 36, Aachen" ' Route to address
    mapIntent.Initialize(mapIntent.ACTION_VIEW,geouri)
    mapIntent.WrapAsIntentChooser("Please choose App")
    StartActivity(mapIntent)

or

Code:
Dim in As Intent
   in.Initialize(in.ACTION_VIEW, $"google.navigation:q=${Latitude},${Longitude}"$)
   in.SetPackage("com.google.android.apps.maps") 'this method is only available in v8.8+. Example of calling it with JavaObject: https://www.b4x.com/android/forum/threads/inline-java-question.97866/#post-616946
   StartActivity(in)
End Sub

Hi Manfred,

Thanks a lot. This does the job.

Best regards,
André
 
Upvote 0
Back
Top