Android Question Library to return lat & lon of postal address

rleiman

Well-Known Member
Licensed User
Longtime User
Hi Everyone,

Is there a B4A library that will allow me to send it a postal address and have it return the latitude and longitude for that address?

Thanks.
 

MarcoRome

Expert
Licensed User
Longtime User
You can use Google API Maps.
Example: if you have this Address: "rivadavia 3250,Ciudad de BuenosAires, Argentina"

You can set this:

B4X:
    Dim Job As HttpJob
Dim found as string = "rivadavia 3250,Ciudad de BuenosAires, Argentina"
Job.Initialize("foundcoordinate", Me)
Job.Download($"http://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=${found}"$)

and you will be this result in json, where you can found coordinate, etc.

B4X:
http://maps.googleapis.com/maps/api/geocode/json?sensor=false&address=rivadavia%203250,%20Ciudad%20de%20Buenos%20Aires,%20Argentina

 
Upvote 0

rleiman

Well-Known Member
Licensed User
Longtime User
Thanks for the coding. I will see if I can find a json tutorial on the B4A web site.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…