“查找最近的位置”通过邮政编码? [英] "Find nearest location" by Zip/Postal Code?
问题描述
我需要在我们的网站上找到最近的位置。
访客输入他们的邮政编码后,他们会被重定向到我们最近位置的特定网页。我们有四十个美国和加拿大的地点。
我该如何构建这样的东西?我可以使用Google Maps API吗?我已经在Google地图上制作了自定义地图。它与我们的位置一起绘制。您可以发送Google地图命令来说出我们在________邮政编码上的最近位置。
有什么建议吗?
<解决方案
google.com/intl/de-DE/apis/maps/articles/phpsqlajax.htmlrel =noreferrer>在Google Maps中使用PHP / MySQL
您必须将您的邮政编码地理编码为坐标(也可以使用Google地图API,但可能更愿意使用完整地址),那么您可以运行教程中详细介绍的近似搜索。
I need a "find nearest location" on our website.
Where visitor enters their zip/postal code, then they are redirected to specific webpage for our nearest location. We have forty USA and Canada locations.
How can I build something like this? Could I do this with the Google Maps API? I already have a custom map on Google Maps. It's plotted with our locations. It would be nice to send Google Maps a command to say "what's our nearest location at ________ zip code".
Any suggestions?
Check out the proximity search featured here:
Using PHP/MySQL with Google Maps
You would have to geocode your zip codes into coordinates (also possible with the Google Maps API, but probably preferable to do with a full address), then you can run the proximimity search detailed in the tutorial.
这篇关于“查找最近的位置”通过邮政编码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!