use of org.activityinfo.server.geo.AdminGeo in project activityinfo by bedatadriven.
the class ImageMapRenderer method drawAdminOverlay.
@Timed(name = "mapping.draw_admin_overlay")
protected void drawAdminOverlay(TiledMap map, Graphics2D g2d, AdminOverlay overlay) {
List<AdminGeo> geometry = geometryProvider.getGeometries(overlay.getAdminLevelId());
Color strokeColor = ColorUtil.colorFromString(overlay.getOutlineColor());
g2d.setStroke(new BasicStroke(1, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND));
for (AdminGeo adminGeo : geometry) {
AdminMarker polygon = overlay.getPolygon(adminGeo.getId());
if (polygon != null) {
GeneralPath path = PathUtils.toPath(map, adminGeo.getGeometry());
g2d.setColor(bubbleFillColor(ColorUtil.colorFromString(polygon.getColor())));
g2d.fill(path);
g2d.setColor(strokeColor);
g2d.draw(path);
}
}
}
Aggregations