如何在谷歌地图中获取道路名称? [英] How to get the road name in google maps?

查看:435
本文介绍了如何在谷歌地图中获取道路名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想只使用google地图中的道路名称而不是确切的地址,使用geocoder或directions service.i尝试了这个结果[0] .address_components [1] .long_name,但它返回了几个不同的名称(不是必要的错误)在同一条路上。

i want to get ONLY the road name in google maps not exact address, using either the geocoder or the directions service.i tried this results[0].address_components[1].long_name but it returns several different names (not necesserily wrong) on the same road.

推荐答案

您需要对位置进行反向地理编码查找。 Google提供: http://code.google.com/apis/maps/documentation/地理编码/

You need to do a reverse geocode lookup on the location. Google provide this: http://code.google.com/apis/maps/documentation/geocoding/

在这里阅读更多信息: http://en.wikipedia.org/wiki/Reverse_geocoding

Read more here: http://en.wikipedia.org/wiki/Reverse_geocoding

这篇关于如何在谷歌地图中获取道路名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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