I need to initialize a list for generating polygons. I have this example:
List<List<Point>> test = List.of(List.of(
Point.fromLngLat(11.079581683351336, 40.806539350413004),
Point.fromLngLat(11.0800563434953, 40.806358652993936),
Point.fromLngLat(11.080342283340997, 40.80669836356384),
Point.fromLngLat(11.079844748009634, 40.806846534421396),
Point.fromLngLat(11.07961027733569, 40.80679232562545),
Point.fromLngLat(11.079581683351336, 40.806539350413004)
));
Its is ok, but when i try initialize:
List<List<Point>> latLngPoints = new ArrayList<>();
# In loops example:
latLngPoints.add(List.of(Point.fromLngLat(latLng.longitude, latLng.latitude)));
# ....
I don’t get multi array, how to properly initialize this type of array liste?