android - Draw path traced by device using maps api v2 -
i developing android application trace device movement.i able current location how can draw route set of points collected during trip
define list points.
list< latlng> points = new list< latlng>();
//add points in list
points.add(new latlng(lat1,lng1)); // point1 points.add(new latlng(lat2,lng2)); // point2 , on.
// define polylineoptions
polylineoptions polylineoptions = new polylineoptions(); polylineoptions.addall(points); polyline route = googlemap.addpolyline(polylineoptions);
// marker use markeroptions
Comments
Post a Comment