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.

fix “There is no connected camera” on my Macbook Pro

note to self: sometimes it happens that applications cannot find a camera on my system, although it is definitely built in and not broken. This can be solved by stopping all applications that may be using the camera and then in a terminal run

sudo killall VDCAssistant

thanks to http://osxdaily.com/2013/12/27/fix-there-is-no-connected-camera-error-mac/ for this solution (check that link for further details)

use the touchbar on your MBP to sudo

just came about this tweet from @cabel:

Pro MacBook Pro Tip: have a Touch Bar with Touch ID? If you edit /etc/pam.d/sudo and add the following line to the top… auth sufficient pam_tid.so …you can now use your fingerprint to sudo!

Edit 28.05.2019: in iTerm 3.2.9 you have to set under “Preferences/Advanced” the value of “Allow sessions to survive logging out and back in.” to “No” for this to work.

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.