I have an
places = ArrayList<ArrayList<LatLng>>
I am adding LatLng points into the inner ArrayList and then I have a for loop that loops and adds polylines to the map.. except it doesnt do that...
How can I add polylines dynamically to the GoogleMap? I checked whether or not places was being populated and it is.
Thanks in advance.
ArrayList<Polyline> pl = new ArrayList<Polyline>();
for(int i =0; i<places.size(); i++){
pl.add(mMap.addPolyline(new PolylineOptions().addAll(places.get(i))));
Log.e("size of places", "size of places is " + places.size());
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…