Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android:Draw path on mapv2 as device moves

i am making an app in which i have to draw path on map as my devices moves. I searched my tutorials but all show to draw path b/w two points but i want to draw path as my device moves. Any help regarding this will be appreciated.


1 Answers

what do you mean as your device move? either way you have to get location updates using location listener and on every new update create a Polyline between the coordinates of the new update and the previous one.

UPDATE: Here are some post that show you how to draw a polyline with direction:

Is there a way to show road directions in Google Map API v2?

Get driving directions using Google Maps API v2

I could use the concepts there to draw you the line you want.

like image 81
Emil Adz Avatar answered Dec 15 '25 09:12

Emil Adz