mapjfx 1.29.0 and 2.10.0 now with OpenLayers 6.0.1 and extension constrains

I just released mapjfx versions 1.29.0 and 2.10.0, they will be available in maven central:

  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>1.29.0</version>
  </dependency>
  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>2.10.0</version>
  </dependency>

1.29.0 is built using Java 8 and 2.10.0 uses Java 12.

This version updates the OpenLayers library to version 6.0.1 (https://github.com/sothawo/mapjfx/issues/66).
Additionally it is now possible to constrain the panning and zooming of a map to a given extent (https://github.com/sothawo/mapjfx/issues/62).

mapjfx 2.9.0 and 1.28.0 with offline cache improvements

I just released mapjfx versions 1.28.0 and 2.9.0, they will be available in maven central:

  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>1.28.0</version>
  </dependency>
  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>2.9.0</version>
  </dependency>

1.28.0 is bilt using Java 8 and 2.9.0 uses Java 12.

These releases add the possibility to pass a list of URLs (map tiles) to the OfflineCache to have the cache populated in the background with the data from these URLs (https://github.com/sothawo/mapjfx/issues/64)

Example:

private void initOfflineCache() {
    final OfflineCache offlineCache = OfflineCache.INSTANCE;
    offlineCache.setCacheDirectory(FileSystems.getDefault().getPath("tmpdata/cache"));
    offlineCache.setActive(true);
    offlineCache.setNoCacheFilters(Collections.singletonList(".*\\.sothawo\\.com/.*"));

    LinkedList<String> urls = new LinkedList<>();
    urls.add("https://c.tile.openstreetmap.org/14/8572/5626.png");
    urls.add("https://b.tile.openstreetmap.org/14/8571/5626.png");
    urls.add("https://a.tile.openstreetmap.org/14/8572/5625.png");
    urls.add("https://c.tile.openstreetmap.org/14/8571/5625.png");
    urls.add("https://b.tile.openstreetmap.org/14/8570/5625.png");
    urls.add("https://a.tile.openstreetmap.org/14/8572/5625.png");
    urls.add("https://a.tile.openstreetmap.org/14/8570/5626.png");
    urls.add("https://a.tile.openstreetmap.org/14/8571/5627.png");
    urls.add("https://a.tile.openstreetmap.org/14/8573/5626.png");
    urls.add("https://a.tile.openstreetmap.org/14/8574/5627.png");
    urls.add("https://b.tile.openstreetmap.org/14/8571/5626.png");
    urls.add("https://b.tile.openstreetmap.org/14/8573/5625.png");
    urls.add("https://b.tile.openstreetmap.org/14/8572/5627.png");
    urls.add("https://b.tile.openstreetmap.org/14/8574/5626.png");
    urls.add("https://c.tile.openstreetmap.org/14/8572/5626.png");
    urls.add("https://c.tile.openstreetmap.org/14/8570/5627.png");
    urls.add("https://c.tile.openstreetmap.org/14/8574/5625.png");
    urls.add("https://c.tile.openstreetmap.org/14/8573/5627.png");

    offlineCache.preloadURLs(urls);
}

 

mapjfx 2.8.0 and 1.27.0 with improved configuration options

it is now possible to disable the zoom controls on the Map (Issue #59) using the new introduced configuration object like this:

mapView.initialize(Configuration.builder()
    .showZoomControls(false)
    .build());

versions 1.27.0 and 2.8.0 will be available in maven central:

  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>1.27.0</version>
  </dependency>
  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>2.8.0</version>
  </dependency>

mapjfx versions 1.26.3 and 2.7.3 release fixing context menu regression

I just released mapjfx versions 1.26.3 and 2.7.3, they will be available in maven central:

  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>1.26.3</version>
  </dependency>
  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>2.7.3</version>
  </dependency>

These releases contain a fix for the regression that caused context clicks not to be intercepted so that the normal browser context menu was shown (https://github.com/sothawo/mapjfx/issues/52)

mapjfx 2.7.1 and 1.26.1 with fixes for WMS servers

I just released mapjfx versions 1.26.1 and 2.7.1, they will be available in maven central:

  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>1.26.1</version>
  </dependency>
  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>2.7.1</version>
  </dependency>

These releases contain 2 fixes in handling WMS servers (https://github.com/sothawo/mapjfx/issues/53 and https://github.com/sothawo/mapjfx/issues/54)

 

mapjfx 2.7.0 and 1.26.0 add the possibility to inhibit zoom and panning

I just released mapjfx versions 1.26.0 and 2.7.0, they will be available in maven central:

  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>1.26.0</version>
  </dependency>
  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>2.7.0</version>
  </dependency>

When initializing the MapView element, it is now possible to pass an argument named interactive, if this is set to false, the user will not be able to change the map zoom by some controls in the map, by scrolling the wheel or double click. It is also not possible to change the map center by dragging or pannig the map with the mouse.

Of course it is still possible to change the map center or zoom level from within the java program.

mapjfx 2.6.0 and 1.25.0 add support for normalized coordinates

I just released mapjfx versions 1.25.0 and 2.6.0, they will be available in maven central:

  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>1.25.0</version>
  </dependency>
  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>2.6.0</version>
  </dependency>

when zooming out, the world map can show some areas more than once, because OpenLayers then just starts unfolding the globe several times. This leads to the fact that the longitude of the reported coordinate leaves the normal range from -180 to 180. To compensate that, the Coordinate class now has a normalize() method that returns a new coordinate with the longitude to be adjusted for the -180 to 180 degrees range.

mapjfx 2.5.0 and 1.24.0 released

I just released mapjfx versions 1.24.0 and 2.5.0, they will be available in maven central:

  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>1.24.0</version>
  </dependency>
  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>2.5.0</version>
  </dependency>

Now slf4j is used as logging framework and zooming by using the scrollwheel now works when the mouse is over a marker or label.

Version 1.24.0 is built using OracleJDK8, whereas version 2.5.0 is built with OpenJDK11.

support for alternate map projections in mapjfx

The latest versions of mapjfx – 1.22.0 and 2.3.0 – have the possibility to have different projections for the map used in OpenLayers. The possible projections are:

  • Web Mercator (EPSG:3857); this is used if no other projection is specified and is the projection that was hardcoded up to now
  • WGS84 (EPSG:4326); this can be set when initializing the MapView object.

Check the mapjfx-demo description and the source code. The actual versions are available in maven central:

  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>1.22.0</version>
  </dependency>
  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>2.3.0</version>
  </dependency>

The two screenshots show the different map projections:

EPSG:4326

EPSG:3857

mapjfx now supports filled polygons

I just released mapjfx versions 1.21.0 and 2.2.0, they will be available in maven central:

  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>1.21.0</version>
  </dependency>
  <dependency>
    <groupId>com.sothawo</groupId>
    <artifactId>mapjfx</artifactId>
    <version>2.2.0</version>
  </dependency>

Now it is possible to close CoordinateLines to polygons with a fill color:


Comments and contributions welcome.