java - Draw a Polyline in Google Maps dynamically inside a loop -
how draw polyline unknown number of lat,long. here code, want make polyline between each track point.
for (trackpoint trackpoint : segment.gettrackpoints()) { log.d(tag, " point: lat " + trackpoint.getlatitude() + ", lon " + trackpoint.getlongitude()); lat = trackpoint.getlatitude(); lon = trackpoint.getlongitude(); log.d(tag,"laat"+lat +"longg"+lon); polyline = mmap.addpolyline(new polylineoptions() .add(new latlng(trackpoint.getlatitude(),trackpoint.getlongitude())) .width(10) .color(color.blue) .geodesic(true)); }
Comments
Post a Comment