将Steet地址解析为组件 [英] Parse A Steet Address into components

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

问题描述

有人有php类或正则表达式将地址解析为组件吗?至少,它应该分为以下几个部分:街道信息,州,邮政编码,国家/地区

Does anyone have a php class, or regex to parse an address into components? At least, it should break up into these components: street info, state, zip, country

推荐答案

一个与库/语言无关的解决方案是为此使用Google的地址解析器.它可以返回有关给定地址的详细细分信息.

A library/language agnostic solution would be to use Google's geocoder for this. It can return detailed, broken-down information about a given address.

http://code.google.com/apis/maps/documentation/services.html#Geocoding_Structured

这篇关于将Steet地址解析为组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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