|
@@ -1,7 +1,8 @@
|
1
|
1
|
package org.insa.graphics.drawing.overlays;
|
2
|
2
|
|
3
|
3
|
import java.awt.Color;
|
4
|
|
-import java.util.List;
|
|
4
|
+import java.util.ArrayList;
|
|
5
|
+import java.util.Collection;
|
5
|
6
|
|
6
|
7
|
import org.insa.graph.Point;
|
7
|
8
|
import org.mapsforge.core.graphics.Canvas;
|
|
@@ -70,10 +71,12 @@ public class PolylineAutoScaling extends Polyline {
|
70
|
71
|
/**
|
71
|
72
|
* @param points Points to add to this line.
|
72
|
73
|
*/
|
73
|
|
- public void add(List<Point> points) {
|
|
74
|
+ public void addAll(Collection<? extends Point> points) {
|
|
75
|
+ ArrayList<LatLong> latlongs = new ArrayList<>(points.size());
|
74
|
76
|
for (Point point: points) {
|
75
|
|
- add(point);
|
|
77
|
+ latlongs.add(new LatLong(point.getLatitude(), point.getLongitude()));
|
76
|
78
|
}
|
|
79
|
+ getLatLongs().addAll(latlongs);
|
77
|
80
|
}
|
78
|
81
|
|
79
|
82
|
@Override
|