PHP纬度经度地址 [英] PHP Latitude Longitude to Address

查看:137
本文介绍了PHP纬度经度地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站上有一个表单,用户输入地点的地址。当他们提交表单时,我将这个位置转换为纬度/经度并将其存储在MySQL数据库中。我正在使用Google的Geocode服务进行此次转换。问题是,我找不到一个班级或服务来将该纬度/经度转换回地址,据我所知,Google的地理编码服务是一种单向转换。我意识到我可以将物理地址存储在数据库中,但随着时间的推移,这是浪费的空间,因为它可以以更简单的格式存储。有人知道从经纬度转换为地址的课程/服务,或者我错了,我可以使用Google的地理编码系统?过去几天我找到了答案,但找不到任何东西。感谢您的帮助!

I have a form on my website where a user enters an address of a place. When they submit the form, I convert this location into latitude/longitude and store this in a MySQL Database. I am using Google's Geocode service for this conversion. The problem is that I can't find either a class or a service to convert that latitude/longitude back to an address and as far as I know, Google's Geocode service is a unidirectional conversion. I realize I could store the physical address in the database, but over time this is wasted space when it could be stored in a simpler format. Does anybody know of either a class/service to convert from latitude/longitude to a address or if I am wrong and I can use Google's geocode system? I have looked for the answer for the past few days but couldn't find anything. Thanks for your help!

推荐答案

您正在寻找Google(或任何其他人) 反向地理编码服务

You're looking for Google's (or anyone else's) reverse geocoding service.

这篇关于PHP纬度经度地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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