Google Maps API - 获取地址的坐标 [英] Google Maps API - Get Coordinates of address

查看:107
本文介绍了Google Maps API - 获取地址的坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将地址转换为long / lat。

有没有办法在不使用JavaScript的情况下做到这一点?因为在我的情况下,不需要显示任何东西,因为转换是在后台。

>您正在寻找的是地理编码



Google提供了一个地理编码网络服务,重新寻找。您可以在您的服务器上进行地理编码。



JSON示例:


http:// maps.google.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway++Mountain+View,+CA

XML示例:


http://maps.google.com/maps/api/geocode/xml?address=1600+Amphitheatre+ Parkway,+ Mountain + View,+ CA



I would like to convert addresses into long/lat.

Is there any way to do this without using JavaScript? Because in my case there is no need to display anything since the conversion is in the background.

解决方案

What you are looking for is called Geocoding.

Google provides a Geocoding Web Service which should do what you're looking for. You will be able to do geocoding on your server.

JSON Example:

http://maps.google.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA

XML Example:

http://maps.google.com/maps/api/geocode/xml?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA

这篇关于Google Maps API - 获取地址的坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆