谷歌地图地理编码器-指向街道 [英] google maps geocoder - point on a street

查看:126
本文介绍了谷歌地图地理编码器-指向街道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我使用Google Maps Geocoder查找地址的点-我通常会在建筑物中间(屋顶顶部)获得一个点

If I use google maps geocoder to find a point of an address - I usually get a point in the middle of the building (roof top)

示例:

Geocoder请求:

Geocoder request:

http: //maps.googleapis.com/maps/api/geocode/json?address=350+Alabama+Street+San+Francisco&sensor=false

所以这个点实际上是在哈里森和阿拉巴马州的街道中间

so the point is actually in the middle of Harrison and Alabama streets

但是我需要得到一个位于阿拉巴马州街道线上的点

But I need to get a point that is located on Alabama street line

有没有办法做到这一点?

Is there a ways to do that ?

推荐答案

您可以请求directionsService而不是进行地理编码,当与google.maps.TravelMode.DRIVING

You may request the directionsService instead of geocoding, this should return a location placed on the street when used with google.maps.TravelMode.DRIVING

查看全文

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