if (!mapPolygons.containsKey(i)) {
List<MapPolygon> list = new ArrayList<>();
mapPolygons.put(i, list);
// Add new map polygons
for (Shape shape : shapes) {
MapPolygon polygon = new MapPolygonImpl(shape.getPoints());
list.add(polygon);
defaultMap.addMapPolygon(polygon);
}
}
} else if (mapPolygons.containsKey(i)) {