In Vaadin Maps (Vaadin 23) I'm finding that only a certain number of markers are displayed on the map. How do I for example show up to say 500 markers (as in 500 locations in the code below)?
locations.stream().forEach(location -> {
Coordinate coordinate = Coordinate.fromLonLat(Double.parseDouble(location.getLon()), Double.parseDouble(location.getLat()));
MarkerFeature customerMarker = new MarkerFeature(coordinate);
map.getFeatureLayer().addFeature(customerMarker);
});
thanks for checking out the new Map component.
There shouldn't be any limit to the number of markers that you can add, neither from the Vaadin component, nor the underlying OpenLayers library.
Here is an example that displays 500 markers:
One thing you could check is whether all locations actually have unique coordinates, maybe there are some overlaps. For example the
Coordinate.fromLonLat
method you use trims values if longitude/latitude are out of bounds, which would put multiple markers in the same location in that case.Apart from that you can always open an issue with a reproduction, and we'll take a look.