mapjfx 1.12.0 has a custom event for selecting a map area
I just released mapjfx version 1.12.0 it should be found shortly at maven central, the artifact coordinates are:
<dependency>
<groupId>com.sothawo</groupId>
<artifactId>mapjfx</artifactId>
<version>1.12.0</version>
</dependency>
The source is available at GitHub .
The MapView now triggers a custom event when the user drags a rectangle while holding the cmd key (on Mac OSX) or the ctrl key (on Windows). This can be used to set the extent of the map to the selected extent, sample code from the mapjfx-demo app:
mapView.addEventHandler(MapViewEvent.MAP_EXTENT, event -> {
event.consume();
mapView.setExtent(event.getExtent());
});
Comments and contributions welcome.