mapjfx version 1.7.1 is release to maven central; the artifact coordinates are:
<dependency> <groupId>com.sothawo</groupId> <artifactId>mapjfx</artifactId> <version>1.7.1</version> </dependency> The source is available at GitHub.
This release has two small improvements:
the OfflineCache of the MapView now has a clear() method which deletes the entires from cache directory when using OpenStreetmap tiles, files from different servers like a.tile.openstreetmap.org and b.tile.openstreetmap.org are mapped to the same cache file Comments and contributions welcome.
I just released mapjfx version 1.7.0 it can be found at maven central, the artifact coordinates are:
<dependency> <groupId>com.sothawo</groupId> <artifactId>mapjfx</artifactId> <version>1.7.0</version> </dependency> The source is available at GitHub.
The library can now use a directory to cache the downloaded map images for later speedup and offline use. Detailed information can be found here.
Comments and contributions welcome.
Sometimes you just need a small simple cache for calculated values because the value generation is expensive in time or resources. In this post I show how such a cache can be implemented in a thread safe way with the Java8 version of the ConcurrentHashMap class with just 2 lines of relevant code.
For this example I use the calculation of the n-th fibonacci number and calculate the values for there input of 1 to 20.