【问题标题】:Parsing location string解析位置字符串
【发布时间】:2010-12-05 18:40:01
【问题描述】:

我正在尝试猜测位置(非美国;可能是街道、邮政编码、社区或城市)

用户在搜索框中输入了内容,我想知道你们能否给我一些关于如何解决此问题的提示。

我的数据库中目前有 5 个表:

Address (address and postal code fields)
Neighborhoods (neighborhood field)
Cities (city field)
States (abbreviation and state fields)
Countries (only one row at the moment, so I'd just ignore it)

我知道格式的唯一字段是州缩写,即两个字符和邮政编码,即 00000-000 或 00000000。

我将如何处理重复的邮政编码、地址、社区和城市名称?

我知道我可以走 Gmaps 路线,但我认为它不会很好地与我的数据库集配合使用..

你们有什么建议?

【问题讨论】:

标签: php mysql parsing geolocation geocoding


【解决方案1】:

你会遇到重新发明轮子的麻烦。

我会使用 Geocoder 来解决这个问题,请参阅本教程 http://www.phpriot.com/articles/google-maps-geocoding/6

【讨论】:

    猜你喜欢
    • 2011-05-21
    • 2022-01-18
    • 2013-02-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-23
    相关资源
    最近更新 更多