简体   繁体   English

google map 地址查询字符串格式而不是纬度/经度?

[英]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我正在开发一个 android 应用程序,我使用纬度/经度来绘制 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.但现在我想通过地址而不是纬度/经度来绘制 map。 I googled but not found any such help for query string to Draw map from addresses.我用谷歌搜索但没有找到任何这样的查询字符串帮助从地址中绘制 map。

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?为什么不使用地理编码器来接收 LatLng 值?

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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