Please WebView and Google map Location

davidmd

Member
Licensed User
Longtime User
Hi
I know it been asked, in different way ..
I tried, Can not get it work..
Will appreciate any help and advice
Regards!
The Codes:

Sub GPS_LocationChanged (Location1 As Location)

lattt.Text = "Lat = " & Location1.ConvertToMinutes(Location1.Latitude)
lontt.Text = "Lon = " & Location1.ConvertToMinutes(Location1.Longitude)
userLocation = Location1
url ="http://maps.google.com/maps?ll=userLocation.Latitude,userLocation.Longitude"
WebView1.LoadUrl(url)


End Sub
 

warwound

Expert
Licensed User
Longtime User
Looks like you need to properly concatenate your url string:
B4X:
url = "http://maps.google.com/maps?ll="&userLocation.Latitude&","&userLocation.Longitude
Log(url)
WebView1.LoadUrl(url)

Martin.
 
Upvote 0

warwound

Expert
Licensed User
Longtime User
There used to be a page on the Mapki that listed many available URL parameters but it looks as though the Mapki is no longer online.

https://www.google.co.uk/search?q=google+maps+url+parameters&ie=UTF-8&oe=UTF-8

Do you want a static map or a (draggable and pannable) interactive map?

I don't think there's much official documentation for URL parameters to the interactive map at maps.google.com but the static maps api is better documented: https://developers.google.com/maps/documentation/staticmaps/.

Martin.
 
Upvote 0
Top