简体   繁体   中英

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.

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.

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);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM