Vector tiles are a very effective vector data format for web mapping. The principle consists of dividing all of the vector data of a project into tiles, in a manner analogous to raster data tiles (WMTS).
There are several standards for producing vector tiles. Mapbox proposed a standard based on the Protocol buffers ("Protobuf") encoding created by Google (https://developers.google.com/protocol-buffers). Mapbox vector tiles (mvt) are supported by a wide range of mapping products including JMap Cloud, JMap Server and JMap NG.
A grid that defines the tiling is applied to the vector data which is then cut into tiles. Each tile can contain vector data from multiple layers.
A set of tiles is produced for each scale level. In web cartography in general, 23 scale levels are considered, level 0 corresponding to the Earth and level 22 corresponding to the street. The vectors of the lower levels are simplified (generalized) to optimize the display of data while keeping tiles of an efficient volume.
The vectors (lines, polygons) of each layer are cut at the tile boundaries. When geometries cross the border between tiles, the tiles are cut and each tile contains part of the geometry. It is the mapping application that unifies the vectors to obtain the complete geometry.
Attributes of map elements are included in the tiles. This makes the data more dynamic and interactive, allowing for example to display thematics created on the fly or to display data based on the application of filters based on their attributes.
The vector tiles therefore contain the geometries and their attributes, the styles are not included in the tiles. The information defining the styles is stored and managed in a separate JSON file. This feature allows application users to define styles dynamically because the applications manage the styles. Additionally, when the data style changes it is not necessary to generate new tiles.
The tiles can be created in advance and cached, the server response being much faster to requests from the web mapping application, which gives a very fluid and efficient rendering.
A JMap Cloud project generates three sets of data that are used by applications:
A JSON file containing style. This file accompanies the vector tiles. It contains the definition of each layer contained in the vector tiles, their style settings, themes, etc.
A set of vector tiles that contain the geometries and attributes of non-editable layers. JMap produces one mvt format file per tile. These tiles can be created on demand as users navigate JMap NG applications. They can also be created in advance and cached.
Vector data in GeoJSON that corresponds to the geometries and attributes of the editable layers. This data is sent on-demand by region to apps.
In general vector tiles are lighter than raster tiles but certain factors can affect the size of the tiles and have an impact on the performance of JMap NG applications. The size of the tiles is associated with the time of their production, the storage volume, the volume of data exchanged with the applications and the dedicated memory of the applications.
Among the factors to consider we can cite:
Number of attributes linked to layers: Attribute data influences the size of the tiles, which increases with the number of attributes.
Layer visibility scales: Setting visibility thresholds for layer display is appropriate when layers have very dense data. Limiting the display of these layers to larger scales is a good strategy because tiles at smaller scales will not contain data from these layers and tile production time will be reduced.
Caching: Producing and caching tiles in advance greatly improves application performance.
Pour gérer le cache de tuiles vectorielles du projet :
To manage the project's vector tile cache: Press to access functions. Tap MVT Cache to open the Manage MVT Tile Cache interface of the project. This interface has four sections:
Indicate the task you want to perform.
Click on Launch task. The Running task section displays task progress graphically and in percentage..
Click on and then on MVT Cache to open the Manage project's MVT tile cache interface. This interface has four sections:
If you want to cancel the task, click on . A message validates your choice.
Cache state
Indicates the cache status, if available.
Fill
This option allows you to indicate whether you want to create tiles for all 23 levels or for a specific range of levels. In this case, specify the minimum and maximum levels of the range. This option does not overwrite tiles that are already cached.
Delete
This option allows you to specify whether you want to remove tiles from all 23 levels or from a specific range of levels. In this case, indicate the minimum and maximum levels of the range.
Running task
Indicates the progress of the creation or deletion by cache level as well as the overall progress of the creation or deletion.