A AlteregoHR Member Licensed User Longtime User Aug 2, 2013 #1 Hello, I have find way to send intnet to google maps for navigation between "Current location" and some destination. Is it possible to send intent that will start navigation between two locations? Thanks.
Hello, I have find way to send intnet to google maps for navigation between "Current location" and some destination. Is it possible to send intent that will start navigation between two locations? Thanks.
NJDude Expert Licensed User Longtime User Aug 2, 2013 #2 Like this: Code: Copy Dim i As Intent i.Initialize(i.ACTION_VIEW, "google.navigation:q=<YOUR_DESTINATION>") StartActivity(i) Upvote 0
Like this: Code: Copy Dim i As Intent i.Initialize(i.ACTION_VIEW, "google.navigation:q=<YOUR_DESTINATION>") StartActivity(i)
A AlteregoHR Member Licensed User Longtime User Aug 2, 2013 #3 Thank you for replay. That is what I have, but i need to send Deatination and Location. I want it to show path from location that I will specify to the destination, not from currnet location. Upvote 0
Thank you for replay. That is what I have, but i need to send Deatination and Location. I want it to show path from location that I will specify to the destination, not from currnet location.
eps Expert Licensed User Longtime User Aug 2, 2013 #4 Something like this : Intent intent =newIntent(android.content.Intent.ACTION_VIEW,Uri.parse("http://maps.google.com/maps?saddr=20.344,34.34&daddr=20.5666,45.345")); startActivity(intent); from here : http://stackoverflow.com/questions/2662531/launching-google-maps-directions-via-an-intent-on-android Upvote 0
Something like this : Intent intent =newIntent(android.content.Intent.ACTION_VIEW,Uri.parse("http://maps.google.com/maps?saddr=20.344,34.34&daddr=20.5666,45.345")); startActivity(intent); from here : http://stackoverflow.com/questions/2662531/launching-google-maps-directions-via-an-intent-on-android
NJDude Expert Licensed User Longtime User Aug 2, 2013 #5 I want it to show path from location that I will specify to the destination, not from currnet location. Click to expand... In that case, the intent is like this: Code: Copy Dim i As Intent i.Initialize(i.ACTION_VIEW, "http://maps.google.com/maps?saddr=New York City, NY,&daddr=Washington, DC") i.SetComponent("com.google.android.apps.maps/com.google.android.maps.MapsActivity") StartActivity(I) Upvote 0
I want it to show path from location that I will specify to the destination, not from currnet location. Click to expand... In that case, the intent is like this: Code: Copy Dim i As Intent i.Initialize(i.ACTION_VIEW, "http://maps.google.com/maps?saddr=New York City, NY,&daddr=Washington, DC") i.SetComponent("com.google.android.apps.maps/com.google.android.maps.MapsActivity") StartActivity(I)
A AlteregoHR Member Licensed User Longtime User Aug 2, 2013 #6 This is the code that I use now for Intent for google maps from Current location to some other location. When intent starts it goes to maps and open window to start geting directions and field destination is populated with lat, lon and field Start point says My location. I would like for that field also to be populated with location ( example 40,720, -74,005). Code: Copy Dim lat As Double: Dim lon As Double Dim Intent1 As Intent: Dim URI As String lat=latitude lon= longitude URI= "geo:" & lat & "," & lon & "?q=" & lat & "," & lon Intent1.Initialize(Intent1.ACTION_VIEW,URI) Intent1.SetComponent("googlemaps") StartActivity(Intent1) Can you help me write URI for your example. The example above doesnt open maps directly but ask me with which program to open. I hope I am making sense Upvote 0
This is the code that I use now for Intent for google maps from Current location to some other location. When intent starts it goes to maps and open window to start geting directions and field destination is populated with lat, lon and field Start point says My location. I would like for that field also to be populated with location ( example 40,720, -74,005). Code: Copy Dim lat As Double: Dim lon As Double Dim Intent1 As Intent: Dim URI As String lat=latitude lon= longitude URI= "geo:" & lat & "," & lon & "?q=" & lat & "," & lon Intent1.Initialize(Intent1.ACTION_VIEW,URI) Intent1.SetComponent("googlemaps") StartActivity(Intent1) Can you help me write URI for your example. The example above doesnt open maps directly but ask me with which program to open. I hope I am making sense
NJDude Expert Licensed User Longtime User Aug 2, 2013 #7 The code is the same I posted before, just replace the arguments with Lat and Lon. Code: Copy Dim i As Intent i.Initialize(i.ACTION_VIEW, "http://maps.google.com/maps?saddr=" & fromLat & "," & fromLon & "&daddr=" & toLat & "," & toLon) i.SetComponent("com.google.android.apps.maps/com.google.android.maps.MapsActivity") StartActivity(i) Last edited: Aug 2, 2013 Upvote 0
The code is the same I posted before, just replace the arguments with Lat and Lon. Code: Copy Dim i As Intent i.Initialize(i.ACTION_VIEW, "http://maps.google.com/maps?saddr=" & fromLat & "," & fromLon & "&daddr=" & toLat & "," & toLon) i.SetComponent("com.google.android.apps.maps/com.google.android.maps.MapsActivity") StartActivity(i)
A AlteregoHR Member Licensed User Longtime User Aug 2, 2013 #8 Thanks for your help. Will try this... Upvote 0
GMan Well-Known Member Licensed User Longtime User Jun 9, 2014 #9 How can i get the lat & lon when pressing on the map (i.e. as destination or (better) when a pre-setted Marker was clicked ? Also by an intent ? Upvote 0
How can i get the lat & lon when pressing on the map (i.e. as destination or (better) when a pre-setted Marker was clicked ? Also by an intent ?
GMan Well-Known Member Licensed User Longtime User Jun 9, 2014 #10 Found : Code: Copy Sub Map_MarkerClick (SelectedMarker As Marker) As Boolean Log(SelectedMarker.Title) Return True End Sub Upvote 0
Found : Code: Copy Sub Map_MarkerClick (SelectedMarker As Marker) As Boolean Log(SelectedMarker.Title) Return True End Sub