3.2. Tile provider settings

Table 3.5. The general properties for provider setups

Property nameValue typeDefault valueDescription
Provider string N/A Determines the type of the head of the provider chain.
SetupName string N/A Determines the name of the active setup.
SetupNames comma separated string list N/A Defines the list of available setup names. If this is given and contains more than one entry, the toolbar button to switch between those setups will be enabled.

Table 3.6. The properties for caching providers

Property nameValue typeDefault valueDescription
CacheFile.AllowUpdate boolean true Determines whether the file cache will be updated by any freshly downloaded tile images. This can be used to prevent modifying the cached files even when the tiles are forced to be refreshed manually. Might be useful in case the cache directory is read-only or the executing user is lacking write permissions.
CacheFile.Directory string N/A Determines the path of the directory where the cached tile images should be stored and looked for. This property supports simple variable expansion with extra support for the DYN_* file variables which are populated with the settings of the FileHandler file. This allows to keep the file cache relative to that file. But it is also possible to simply specify any absolute path here.
CacheFile.Format string jpg Determines the format in which to store the local tile images. This is deliberately independent of the file format that was retrieved from the internet tile service provider in order to allow further compression (many providers deliver .PNG files which can be compressed significantly by using .JPG here). The string given here must be one of the image formats recognized by javax.imageio, e.g. "png", "jpg", etc..
CacheFile.MaxAge duration 0-00:00:00.000 Determines the maximum age after which map tiles cached in the cache directory should be treated as out-of-date. Outdated tiles will then be re-fetched from the underlying provider upon next access. If this is zero (the default) then tiles will be kept indefinitely in the cache and the only way to update them is a manual forced refresh.
CacheFile.Provider string N/A Determines the type of the tile provider that should be consulted in case a tile is missing in the file cache directory.
CacheMemory.MaxAge duration 0-00:00:00.000 Determines the maximum age after which map tiles cached in memory should be treated as out-of-date. Outdated tiles will then be re-fetched from the underlying provider upon next access. If this is zero (the default) then tiles will be kept indefinitely in the cache and the only way to update them is a manual forced refresh.
CacheMemory.Provider string N/A Determines the type of the tile provider that should be consulted in case a tile is missing in the memory cache.
CacheMemory.SizeLimit int 16 Determines the maximum number of tiles to keep in memory.

The two duration properties above must be specified in the exact format as follows:

  1. Number of days as a non-negative integer

  2. A single dash: "-"

  3. Number of hours with exactly two digits

  4. A single colon: ":"

  5. Number of minutes with exactly two digits

  6. A single colon: ":"

  7. Number of seconds with exactly two digits

  8. A single dot: "."

  9. Number of milli seconds with exactly three digits

Any deviation from this format will result in an error when loading the file.

Table 3.7. The properties for network backend providers

Property nameValue typeDefault valueDescription
ArcGIS.URL string see below Determines the template tile URL for this provider.
BingMaps.URL string see below Determines the template tile URL for this provider.
GoogleMaps.URL string see below Determines the template tile URL for this provider.
OpenStreetMap.Copyright string (empty) Allows to override the default copyright message for this provider as some tile servers might deliver tiles according to the OpenStreetMap tiling pattern but based on their own data and thus with a different copyright. If this is empty or unspecified, the standard OpenStreetMap copyright is displayed by this provider.
OpenStreetMap.MaxZoom integer 18 Determines the maximum zoom limit for this provider. This can be adjusted as different OpenStreetMap tile servers can have different such limits.
OpenStreetMap.URL string see below Determines the template tile URL for this provider.
WebMapService.Copyright string (empty) Allows to display a copyright message for this provider as most such map servers will deliver map data according to specific usage terms. If this is empty or unspecified, no copyright is displayed by this provider.
WebMapService.MaxZoom integer 18 Determines the maximum zoom limit for this provider. This can be adjusted as different map servers can have different such limits.
WebMapService.MinZoom integer 0 Determines the minimum zoom limit for this provider. This can be adjusted as different map servers can have different such limits.
WebMapService.URL string see below Determines the template tile URL for this provider.
WebMapService.BasicAuth.Username string (empty) Specifies a username to use for HTTP BasicAuth. This will only be used in case both username and password have been specified.
WebMapService.BasicAuth.Password string (empty) Specifies a password to use for HTTP BasicAuth.
YandexMaps.URL string see below Determines the template tile URL for this provider.

The URLs for the different providers above can be omitted in case they don't differ from the default values as follows:

All the above providers support replacing the following variables in the template URL:

Table 3.8. The properties for the special offline provider

Property nameValue typeDefault valueDescription
Offline.Background color 89,89,89 Determines the background color for unavailable tiles.
Offline.Text string [Unavailable because offline] Determines a message to be displayed a the tile center.
Offline.TextColor color 200,0,0 Determines the text color for the tile message.
Offline.TextFont string Dialog-ITALIC-14 Determines the font name for the tile message.
Offline.Copyright string (empty) Allows to display a copyright message for this provider. If this is empty or unspecified, no copyright is displayed by this provider.
Offline.MaxScale integer 10 Determines the maximum scale of this provider.
Offline.MaxZoom integer 20 Determines the maximum zoom of this provider.
Offline.MinScale integer 0 Determines the minimum scale of this provider.
Offline.MinZoom integer 0 Determines the minimum zoom of this provider.
Offline.TileSize integer 256 Determines the tile size of this provider.

This provider can be used as a backend for one of the caching providers in case it must be guaranteed that no network access will occur. In such a case tile size and the minima and maxima for scale and zoom should be configured to match the available tiles in the (file-) cache.