use of org.oscim.layers.vector.geometries.Style in project PocketMaps by junjunguo.
the class MapHandler method createPathLayer.
private PathLayer createPathLayer(int color, int strokeWidth) {
Style style = Style.builder().fixed(true).generalization(Style.GENERALIZATION_SMALL).strokeColor(color).strokeWidth(strokeWidth * activity.getResources().getDisplayMetrics().density).build();
PathLayer newPathLayer = new PathLayer(mapView.map(), style);
return newPathLayer;
}
use of org.oscim.layers.vector.geometries.Style in project graphhopper by graphhopper.
the class MainActivity method createPathLayer.
private PathLayer createPathLayer(PathWrapper response) {
Style style = Style.builder().fixed(true).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;
}