Google Maps API v3获取街道的起点和终点坐标 [英] Google Maps api v3 get start and end coordinates of a street
本文介绍了Google Maps API v3获取街道的起点和终点坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
request = {
origin:街道名,
目的地:街道名,
travelMode:google.maps.TravelMode.DRIVING
};
在这个例子中,它会返回原点和目的地的相同坐标。
有什么建议吗?感谢。
解决方案
Google Maps API v3没有这样做。您需要找到不同的数据源或手动确定坐标。
I want to highlight a specific street by name. I can do this with the start and end coordinates of a street. I don't want to pass in coordinates but the street name. Google Maps will return the street coordinates but I need both start and end coordinates.
request = {
origin: "streetname",
destination: "streetname",
travelMode: google.maps.TravelMode.DRIVING
};
In this example it will return the same coordinates for origin and destination.
Any suggestions? Thanks.
解决方案
The Google Maps API v3 doesn't do that. You need to find a different data source or manually determine the coordinates.
这篇关于Google Maps API v3获取街道的起点和终点坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文