I'm creating an application for drawing pollution information on a JMapViewer. I want to do this with MapPolygons, but I didn't find a good documentation about it. I succeeded to create new MapPolygons like this:
private MapPolygon getPolygon(double lat, double lon, Color col){
List<Coordinate> coords = new ArrayList<>();
//add all points to the list...
MapPolygon poly = new MapPolygonImpl(coords);
return poly;
}
I'm wondering how I could change the color and remove the border of the MapPolygon. There is no function setColor or such...
I tried directly with the constructor, but this doesn't work:
MapPolygon poly = new MapPolygonImpl(coords, Color.RED, new BasicStroke(0));
Does anybody know how I can change the color of the MapPolygon? Thanks!
Found it out. You have to create a layer and a style: