android google 绘制步行路线图
android google maps walking directions
我正在使用 google 地图 api v2 开发一个 android 应用程序。
问题是 google 地图根据道路路线显示方向,即使它是开阔的地面。
例如,拿这两个 LatLng
LatLng1 : -33.891143, 151.224473
LatLng2 : -33.891580, 151.225336
http://i.stack.imgur.com/Xt0Ox.png
但我想显示一个直线方向,因为它是一个开阔的地面。我正在使用 JSON 来获取路线(公交、步行、驾车),例如
http://maps.googleapis.com/maps/api/directions/json?origin=-33.891143, 151.224473&destination=-33.891580, 151.225336&sensor=false&units=metric&mode=transit
有什么办法可以做到这一点吗?
提前致谢
我认为Google地图只是不知道你可以走过去。
解决方法是绘制 simple polyline between the two points if they are close to each other, and if they are both open ground.
我正在使用 google 地图 api v2 开发一个 android 应用程序。 问题是 google 地图根据道路路线显示方向,即使它是开阔的地面。 例如,拿这两个 LatLng LatLng1 : -33.891143, 151.224473 LatLng2 : -33.891580, 151.225336
http://i.stack.imgur.com/Xt0Ox.png
但我想显示一个直线方向,因为它是一个开阔的地面。我正在使用 JSON 来获取路线(公交、步行、驾车),例如 http://maps.googleapis.com/maps/api/directions/json?origin=-33.891143, 151.224473&destination=-33.891580, 151.225336&sensor=false&units=metric&mode=transit
有什么办法可以做到这一点吗? 提前致谢
我认为Google地图只是不知道你可以走过去。
解决方法是绘制 simple polyline between the two points if they are close to each other, and if they are both open ground.