要么孵化 要么臭掉
Reverse Geocoding for Google Maps API
Reverse Geocoding ,也就是反向地理编码(逆地理编码),可以根据地图上某一点的经纬度值来查询该点附近的地理信息。比如要实现捕获用户鼠标事件判断用户点的是哪国哪省哪市哪条街道,就需要有相应的 reverse geocoding 服务支撑。
在当前版本的 Google Maps API 中对这项功能提供了有限支持。对于开放了 Geocoding (GClientGeocoder) 和 Driving Directions (GDirections) 接口的国家和地区,Nico Goeminne 写了个 GReverseGeocoder 类来完成反向地理编码解析(Google Pages 貌似这几天被 GFW 掉了,访问不到 Nico Goeminne 站点的朋友可以看我本地的镜像链接)。可惜的是目前谷歌中国的ditu.google.com还没有提供GDirections接口,不知道后续的版本会不会放出。下面是 Nico Goeminne 列出的 GReverseGeocoder 当前的国家支持情况(x=支持, n=不支持, p=理论上支持但未经过测试):
| Country | GClientGeocoder | GDirections | GReverseGeocoder |
|---|---|---|---|
| Austria | x | x | p |
| Australia | x | x | p |
| Belgium | x | x | x |
| Brazil | x | x | x |
| Canada | x | x | p |
| The Czech Republic | x | x | p |
| Denmark | x | x | p |
| Finland | x | x | p |
| France | x | x | x |
| Germany | x | x | x |
| Hong Kong | x | n | n |
| Hungary | x | x | p |
| India | x | n | n |
| Ireland | x | x | p |
| Italy | x | x | x |
| Japan | x | n | n |
| Luxembourg | x | x | x |
| The Netherlands | x | x | x |
| New Zealand | x | x | x |
| Norway | x | x | p |
| Poland | x | x | p |
| Portugal | x | x | p |
| Singapore | x | x | p |
| Spain | x | x | p |
| Sweden | x | x | p |
| Switzerland | x | x | x |
| Taiwan | x | n | n |
| Thailand | x | x | p |
| the United Kingdom | x | x | x |
| the United States | x | x | x |
实际上,在 Google Maps API 官方文档里面 GClientGeocoder 接口的 getLocations(address, callback) 方法里面虽然没有明确说明,却可以传递用逗号或空格分隔的经纬度值进去作为address参数,也能达到反向地理编码解析的目地。只是目前这样调用返回的Placemark对象精度只能到国家级别,并没有更进一步的所在地信息,还没有太多的实际价值。
一些非 Google Maps 提供的 geocoding / reverse geocoding 服务链接: http://groups.google.com/group/Google-Maps-API/web/resources-non-google-geocoders ,基本上可查询范围都是欧美国家,有偿服务居多。
中国区域的 reverse geocoding 服务方面, MapABC的搜索API中倒是有 reverseGeoCoding(msearchpointpara) 接口方法,美中不足的是其flash版本的地图跨浏览器兼容性又不是太好还有滚动广告条,文档的组织也够凌乱,所使用的经纬度坐标又不是标准的数字形式,极大的影响了使用体验;51ditu 的位置描述接口则直接作为收费接口有偿提供。看来想使用免费又称心的 reverse geocoding 还得耐心等谷歌地图开放相应的功能了。
2008年 04月
2008年 03月
2008年 02月
2008年 01月
2007年 12月
2007年 11月
2007年 10月
2007年 09月
2007年 08月
2007年 07月
2007年 06月
2007年 05月
2007年 04月
2007年 03月
2007年 02月
2007年 01月
2006年 12月
2006年 11月
2006年 10月
2006年 09月
2006年 08月
2006年 07月
2006年 06月
2006年 05月
2006年 04月
2006年 03月
2006年 02月
2006年 01月
2005年 12月
2005年 11月
2005年 10月
2005年 09月
2005年 08月
2005年 07月
2005年 06月
2005年 05月
2005年 04月
Pivot1.24.1 开发

这个太别扭了,是我的话就这么改
"(v=支持, x=不支持, p=理论上支持但未经过测试)"