Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to keep marker on road? Google Maps Android

I'm developing an app that tracks the GPS position of the user and shows it with a marker in the map. The updates are every 2 seconds.

The problem is the position I get is not so accurate than with other apps like WAZE, Maps, and so on. The user always is driving so is in the road, but the marker sometimes is about few meters left or right out.

Using the other apps this is not happening, like they know that you are in a road and snaps the position to it ignoring a little gps error.

So, how can I achieve this? I really need it!

Thank you so much in advance =)

Still nothing with this? Please help!

like image 642
Alberto Avatar asked Jun 02 '14 18:06

Alberto


1 Answers

GPS error for roads can be fixed by overlaying raw data on road maps. To achieve this for small scale, you can use a snap to roads API, available through mapping providers like Google Maps and OSM.

  • Google Maps snap to roads API
  • OSRM match service

If you are looking for an end-to-end solution that visualises location data on the road, you can also try the HyperTrack SDK for Android or iOS. Location data from automotive drives is automatically snapped to roads. (Disclaimer: I work at HyperTrack.)

like image 185
arjunattam Avatar answered Nov 03 '22 01:11

arjunattam