use of org.oscim.layers.vector.PathLayer in project graphhopper by graphhopper.
the class MainActivity method createPathLayer.
private PathLayer createPathLayer(PathWrapper response) {
Style style = Style.builder().generalization(Style.GENERALIZATION_SMALL).strokeColor(0x9900cc33).strokeWidth(4 * getResources().getDisplayMetrics().density).build();
PathLayer pathLayer = new PathLayer(mapView.map(), style);
List<GeoPoint> geoPoints = new ArrayList<>();
PointList pointList = response.getPoints();
for (int i = 0; i < pointList.getSize(); i++) geoPoints.add(new GeoPoint(pointList.getLatitude(i), pointList.getLongitude(i)));
pathLayer.setPoints(geoPoints);
return pathLayer;
}