Google Maps API - 获取街道坐标 [英] Google Maps API - Getting Street Coordinates

查看:100
本文介绍了Google Maps API - 获取街道坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google Maps API 有什么方法可以获得某个位置的街道坐标?

很简单:I只想获得最近的街道坐标。为了得到这个我需要,例如,构成一条街道的所有坐标。



有没有这样的事情?



传递给定地址(或位置)作为原点 destination到 directionsService.route()并使用travelMode DRIVING 。响应应该包含最近的街道。



演示: http:/ /jsfiddle.net/doktormolle/W3VGN /


Google Maps API has any way to get the street coordinates of an location?

Is simple: I just want to get the nearest street coordinate. To got this i need, for example, all coordinates that compose a street.

Are there something like this?

解决方案

You may use the directionService.

Pass the given address(or location) as origin and destination to directionsService.route() and use the travelMode DRIVING . The response should contain the nearest street.

Demo: http://jsfiddle.net/doktormolle/W3VGN/

这篇关于Google Maps API - 获取街道坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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