Добрый день!
Похоже нашли баг… Не обрабатываются клики по геолокации (красный флажок) на карте.
@Inject
private GeoMap map;
Привожу код метода перестроения карты. Принты в обработчике кликов не попадают в catalina.out
private void reloadMap() {
if (startDate.getValue() == null) return;
var locations = detachmentService.getGeoLocations(startDate.getValue(), commonFilter.getDepartment());
CanvasLayer canvasLayer = map.getCanvas();
canvasLayer.clear();
GeometryFactory factory = new GeometryFactory();
for (var location : locations) {
var contentBuilder = new StringBuilder();
var items = (List<KeyValueEntity>) location.getValue("items");
contentBuilder.append("<table>");
contentBuilder.append("... некоторое наполнение таблицы ...");
contentBuilder.append("</table>");
CoordinateArraySequence coordinates = new CoordinateArraySequence(1);
coordinates.setOrdinate(0, 0, location.getValue("location_y"));
coordinates.setOrdinate(0, 1, location.getValue("location_x"));
final Point point = new Point(coordinates, factory);
CanvasLayer.Point mapLocation = canvasLayer.addPoint(point);
mapLocation.setStyle(new PointStyle(
new FontPointIcon(CubaIcon.FLAG)
.setIconPathFillColor("#ff0000")
.setIconTextFillColor("white")
.setIconPathStrokeColor("black")))
.setPopupContent(contentBuilder.toString());
// клик по локации
mapLocation.addClickListener(event -> {
System.out.println("addClickListener");
});
mapLocation.addRightClickListener(event -> {
System.out.println("addRightClickListener");
});
}