仅跟踪道路在谷歌的位置图V2的android [英] Trace the location only on Road in Google maps V2 android

查看:188
本文介绍了仅跟踪道路在谷歌的位置图V2的android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要显示的用户的当前位置只对道路(未旁路),而移动。我已经使用了的LocationManager 来获取当前位置。但有时我正在路边的位置,这一点,在地图上的位置点显示在路边。其实,我要展现他在中路的位置只(如果他是在公路旁)。我搜索很多关于这一点,但没有得到任何想法。

例如:我如何获得在地图上的当前位置。


 


  
  

A ---ñ-------乙


  
  

在这里,结果A是起点
        结果B是终点
        结果,n是道路(当前位置的某个时候)
        结果m是公路旁(当前位置)


不过,我需要的M还应该在路上。

请帮我在这。


解决方案

在谷歌路线服务会计算从最近的公路,以便计算从当前位置到当前位置 - 回到起始位置将是在道路上

但是,如果用户确实是越野在商场停车场比如?

I want to show the current location of the user only on road(not beside of the road) while moving. I have used the LocationManager to get the current location. But sometimes I am getting the location beside the road, with this, the location point on map is showing beside the road. Actually, I have to show his location on Road(if he is beside the road) only. I searched lot for this but didn't get any idea.

Example: How I am getting the current locations on map.

    m

A---n-------B

here,
A is start point
B is end point
n is on road(current location for sometime)
m is beside road(current location)

But I would need the m also should be on road.

Please help me on this..

解决方案

The google directions service will calculate from nearest road so calculate directions from current location to current location - returned starting location will be on a road.

But what if user genuinely is off-road in a shopping mall carpark for instance?

这篇关于仅跟踪道路在谷歌的位置图V2的android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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