Azhar
Azhar

Reputation: 20680

google map query string format for addresses instead of lat/long?

I am developing an android application for which I am using latitude/longitude to draw a map

http://maps.google.com/maps?saddr=47.295601,0.010586&daddr=47.295601,1.010586
+t‌​o:47.295601,2.010586+to:47.295601,3.010586+to:42.223501,2.011586
+to:35.215621,1.020456

but now I want to draw the map through addresses instead of latitude/Longitude. I googled but not found any such help for query string to Draw map from addresses.

Upvotes: 2

Views: 2672

Answers (3)

Do the same thing but separate each part of the address with commas.

http://maps.google.com/maps?saddr=47.295601,0.010586
&daddr=123 Main Street, Houston, Texas, 77707
+t‌​o:47.295601,2.010586
+to:321 Avenue A, Baton Rouge, Lousiana, 68594
+to:42.223501,2.011586
+to:35.215621,1.020456

You may use a combination of coordinates and addresses.

Upvotes: 2

Marco
Marco

Reputation: 980

Why dont you use the Geocoder to receive the LatLng values?

Geocoder geocoder = new Geocoder(this, Locale.getDefault());
List<Address> adr = geocoder.getFromLocationName(locationName, maxResults);

Upvotes: 0

Related Questions