Using a GeoWebCache Server

JMap Web applications use an approach based on the production of map images generated by JMap Server. The images can be produced as a series of tiles that are adjacent to one another, for each scale level. Lower scale levels contain a small number of tiles (small scale, few details on a large portion of territory), while higher scale levels typically contain a large amount of tiles (large scale, many details on a large portion of territory).

These images are created on request when users navigate on the map in web applications. Producing these images demands a lot of work from JMap Server and therefore can cause significant delays in these applications. To improve performance, it is recommended to use a tile cache system. This system caches each tile once it is produced and can also ask JMap Server to produce all images of each layer in advance. This operation can require several hours of work during which JMap Server will be very busy. In addition, the sum total of the cached tiles can require considerable storage space. Afterwards, this will greatly accelerate navigation in web applications, since all images will have been produced and made available.

JMap Server is compatible with the open source product GeoWebCache (http://geowebcache.org). However, to improve integration with JMap Admin, K2 Geospatial provides its own slightly adapted version of GeoWebCache. Visit K2 Geospatial’s website (http://k2geospatial.com) to download the GeoWebCache installer for JMap Server.

Configuring JMap to use GeoWebCache

To use GeoWebCache in conjunction with JMap Server, JMap Admin must be configured to provide JMap with the settings to connect to GeoWebCache. These settings are entered in the section JMap Server / Settings.

The URL to GeoWebCache indicates the JMap Server address that communicates with GeoWebCache. Providing more than one URL towards GeoWebCache enables web and mobile applications to launch more image queries simultaneously, which improves performance when loading the map. These URLs must use domain names or IP addresses that point to the same GeoWebCache instance (e.g. cache1.jmaponline.net, cache2.jmaponline.net).

The username and password configured allow JMap Server to connect to GeoWebCache and send it commands. For instance, JMap Server can ask GeoWebCache to create, delete or update tile caches. These settings must match the configuration in GeoWebCache. Read below for more information on configuring GeoWebCache.

See the JMap Server Settings section for more information on configuring these settings.

Configuring GeoWebCache

GeoWebCache is not included with JMap and must be installed separately. For more information on installing and configuring GeoWebCache, read the following article.

Using GeoWebCache for JMap Web applications

If GeoWebCache is correctly installed and configured, you can use it with JMap Web applications. Usage of GeoWebCache for this type of applications is configured when these are deployed. It is when you configure layers that you can select the Cached option. See JMap Web Applications.

In the information section of a web or mobile application that has already been deployed, there is a subsection titled Cached layers. This subsection displays the list of layers for which the Cached option was activated. This section allows you to manage caching and access the GeoWebCache management console.

Cache state

For each layer, click on Seed to launch the production of the tile cache. This process can be cancelled by clicking on Cancel. To delete the cache for a layer, click on Delete. Cache production can take a very long time. If you wish to manage the cache directly in the Geowebcache interfaces, click on Manage in Geowebcache.

Dernière mise à jour

K2 Geospatial 2022