Fix issue with new path not being colored correctly in MapView drawing.
This commit is contained in:
parent
ec9cd9c601
commit
7e079df22f
@ -424,7 +424,7 @@ public class MapViewDrawing extends MapView implements Drawing {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PathOverlay drawPath(Path path, Color color, boolean markers) {
|
public PathOverlay drawPath(Path path, Color color, boolean markers) {
|
||||||
PolylineAutoScaling line = new PolylineAutoScaling(1, DEFAULT_PATH_COLOR);
|
PolylineAutoScaling line = new PolylineAutoScaling(1, color);
|
||||||
ArrayList<Point> points = new ArrayList<>(path.getArcs().size() * 4);
|
ArrayList<Point> points = new ArrayList<>(path.getArcs().size() * 4);
|
||||||
for (Arc arc: path.getArcs()) {
|
for (Arc arc: path.getArcs()) {
|
||||||
points.addAll(arc.getPoints());
|
points.addAll(arc.getPoints());
|
||||||
@ -432,10 +432,10 @@ public class MapViewDrawing extends MapView implements Drawing {
|
|||||||
line.addAll(points);
|
line.addAll(points);
|
||||||
PathOverlay overlay = null;
|
PathOverlay overlay = null;
|
||||||
if (markers) {
|
if (markers) {
|
||||||
MarkerAutoScaling origin = createMarker(path.getOrigin().getPoint(), DEFAULT_PATH_COLOR,
|
MarkerAutoScaling origin = createMarker(path.getOrigin().getPoint(), color, color,
|
||||||
DEFAULT_PATH_COLOR, AlphaMode.TRANSPARENT),
|
AlphaMode.TRANSPARENT),
|
||||||
destination = createMarker(path.getDestination().getPoint(), DEFAULT_PATH_COLOR,
|
destination = createMarker(path.getDestination().getPoint(), color, color,
|
||||||
DEFAULT_PATH_COLOR, AlphaMode.TRANSPARENT);
|
AlphaMode.TRANSPARENT);
|
||||||
overlay = new MapViewPathOverlay(line, origin, destination);
|
overlay = new MapViewPathOverlay(line, origin, destination);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user