<分区>
是否有 google maps api 允许您传入位置名称并返回指向 googlemaps 上的位置的坐标?
<分区>
是否有 google maps api 允许您传入位置名称并返回指向 googlemaps 上的位置的坐标?
最佳答案
这是一个示例请求:
http://maps.googleapis.com/maps/api/geocode/xml?address=Berlin&sensor=false
您可以过滤结果:geometry/location/lat
和 lng
<GeocodeResponse>
<status>OK</status>
<result>
<type>locality</type>
<type>political</type>
<formatted_address>Berlin, Deutschland</formatted_address>
[…]
<geometry>
<location>
<lat>52.5234051</lat>
<lng>13.4113999</lng>
</location>
<location_type>APPROXIMATE</location_type>
<viewport>[…]</viewport>
<bounds>[…]</bounds>
</geometry>
</result>
</GeocodeResponse>
关于html - 一个好的 google.maps 地理定位 api?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6697724/