Hi all
I am trying to add an overlay on top of the map.
As such, I would like to add a polygon onto the map. Here’s my code. Unfortunately, the polygon doesn’t appear.
Please advise. Thanks.
Coordinate c1 = new Coordinate(...);
Coordinate c2 = new Coordinate(...);
Coordinate c3 = new Coordinate(...);
Coordinate c4 = new Coordinate(...);
Coordinate c5 = new Coordinate(...);
Coordinate c6 = new Coordinate(...);
Coordinate c7 = new Coordinate(...);
List<Coordinate> route = new ArrayList<Coordinate>(Arrays.asList(c1,c2,c3,c4,c5,c6,c7));
mapViewer.addMapPolygon(new MapPolygonImpl(route));
mapViewer.setMapPolygonsVisible(true);
mapViewer.repaint();