-1
我試圖在將地圖放置在地圖上之後更改折線,但它的點列表似乎是不可更改的。多義線點列表上的CRUD操作不起作用。更改折線點
PolylineOptions polylineOptions = new PolylineOptions() //New PolylineOptions
.add(new LatLng(FromNode.Lat, FromNode.Lon)) //with 2 coordinates
.add(new LatLng(ToNode.Lat, ToNode.Lon));
Polyline polyPath = map.addPolyline(polylineOptions); //Add polyline on map
polyPath.getPoints().remove(0); //Should remove 0 element
polyPath.getPoints().size(); //Still 2 elements
polyPath.getPoints().add(new LatLng(0,0)); //Add new point
polyPath.getPoints().size(); //Still 2 elements