3

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 Answers1

1

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.

Community
  • 1
  • 1
Emil Adz
  • 40,709
  • 36
  • 140
  • 187
  • As location of device change –  Mar 05 '13 at 11:03
  • @user775 This is what he discribed. Use a `LocationListener` to see when the location of the device changes. Check the Developer Page for more information: http://developer.android.com/reference/android/location/LocationListener.html – lambda Mar 05 '13 at 11:21
  • Can you guide me with some tutorial where path is drawn with polyline –  Mar 05 '13 at 12:50
  • 1
    I am adding 2 post that describe how to show direction on google map V2, i think you can take some ideas from there, see updated answer. – Emil Adz Mar 05 '13 at 12:54