Instructions for use
Supports generating vector tiles that adhere to the MapBox MVT specification from vector maps. Tile data includes the geometric shapes and attributes of features, while the style of features is described by the MapBox standard style file (style.json). Compared to raster tiles, vector tiles offer advantages such as smooth zooming, style modification, and relatively smaller data size, better meeting the needs of flexible and diverse web map applications. For a description and comparison of raster tiles and vector tiles, refer to the Map Tile Types page. Below, the steps are explained using the example of generating map tiles (single process).
Function Entry
- Workspace Manager -> Map Node -> Right-click the target map -> Generate Map Tiles (Single Process).
- Right-click the map and select Generate Map Tiles (Single Process).
- Map Tab -> Cartography Group -> Single Process.
Operation Steps
- New Tiling Task: In the Generate Map Tiles (Single Process) dialog, choose one of three single-process map cache methods: New Tiling Task, Update/Append Tiles, or Resume/Restore Tiles. Select New Tiling Task here.
- Setting Scale Information: Set scale parameters for generating tiles in the Single Process: Generate Map Tiles dialog. The scale list is automatically generated based on map data. Modify scale information using the scale toolbar, including switching scale schemes, adding scales, or importing/exporting scale configuration files or tile configuration files.
Tip:
- A tile configuration file (*.sci) saves the scales and other tile production parameters for generating map tiles.
- A scale configuration file only records scale information.
- Parameters:
- Tile Type:: Select Vector Tile.
- The Size of Tiles: Size of each generated tile in pixels (PX). Options are 512*512 and 256*256, with the default being 512*512.
- Tile Range: Set the tile range. Each tile expands outward based on this value, including data within the buffer range. This ensures seamless connections between adjacent tiles when browsing. Default is 16 pixels.
- Generate Font Cache File: Generates font files for the map. Not selected by default. Select this when updating font styles separately; results are stored in the fonts folder.
- Separate Data from Style: Sets whether to store vector tile data and style separately. Select this to separate data from style; deselect to keep them combined. Use this when updating vector tile data or style independently later.
Warning:
If layers in the map use filter expressions or labels with backgrounds, independent generation and updating of vector tile data and style are not supported. Otherwise, the generated tile data and style may not match correctly.
- Add All Attribute Fields: Sets whether the tile results contain all non-system fields of the dataset. Select this to include all non-system fields of the dataset geometry; deselect to output only fields used in map display.
Select this when front-end applications require additional fields for data queries. Outputting all property fields may slow down generation if layers have many fields.
- Generate Vector Tile: Selected by default. Generates vector tiles stored in the tiles folder. Unavailable when generating tiles via multi-process.
- Rarefy Display: Select to simplify geometries at small scales, improving display performance. Deselect to disable simplification.
- Generate Tiles Style: Selected by default. Generates a *.json file containing the map style, stored in sprites and styles folders. Unavailable when generating tiles via multi-process.
- Generate Index: Not selected by default. If vector polygons exist in the tile, they are triangulated to generate a mesh index, accelerating WebGL loading.
- Save Settings:
- Tile Name: Name of the folder for generated tiles, defaulting to the map name. If a tile with this name exists in the storage path, a prompt like "China100_2021 already exists. Please re-enter the tile name or storage path." appears.
- Storage Format: Offers three formats: Compact, Original, and MongoDB. For details, see Tile Storage Formats.
- When selecting Original or Compact, set the storage method.
- When selecting MongoDB, set the server address, database name, and optionally encrypt tiles with a password.
Notes:
MongoDB version 2.0 authentication is not supported for generating map tiles. For MongoDB usage, refer to MongoDB Instructions for Use.
- Storage Method:: Choose Local or Cloud for storing generated tiles.
- Select Local to store tiles and intermediate files in the specified local path.
- Select Cloud Storage to store tile files in a cloud path. First Add a Cloud Storage Connection; set a working directory for intermediate files during tile generation.
- Storage Path:: Path for storing generated tiles.
- Working Directory: Required when storage method is Cloud or format is MongoDB. Stores intermediate files for resuming or updating tiles.
- Tile Bounds: Sets the geographic range for tile generation. Options:
- Whole Map: Uses the entire map range; coordinates display in four text boxes.
- Current Window: Uses the current window range.
- Custom Bounds: Click the drop-down button to set bounds via Select Object, Draw Rectangle, or Custom Expression.
- Select Object: Switches to the map to select objects as the range. Hold Shift for multiple selections; right-click to finish.
- Draw Rectangle: Switches to the map to draw a rectangle; right-click to finish.
- Custom Expression: Opens the SQL Expression dialog; the minimum bounds of search results define the tile bounds.
- Copy, Paste: Copy geographic range; paste to set bounds in supported settings.
- Filter Selected Object Layer: When tile bounds are set via Select Object, select this to filter the object layer during generation; otherwise, no filtering. Only effective with multiple layers.
- Tile Origin: Basis for tile division rules. Fixed tile origin allows merging tiles with the same origin. Vector tiles do not support modifying index bounds. For geographic coordinate systems, index bounds are [-180,90]; for projected systems, it's the map bounds' top-left corner.
- After setting parameters, execute tile generation.
Notes:
- Maps in planar coordinate systems do not support vector tile generation. If a map is non-planar but layers use planar datasets, change the dataset coordinate system.
- Vector tiles do not support update/append or resume/restore operations.
- Multi-point data layers cannot generate vector tiles; remove them first.
- After completing the map cache task, the output window confirms success. The export directory contains:
- fonts: Font files for vector tiles.
- sprites: Icon-related style resources.
- styles: Style description files.
- thumbnail: Stores vector tile thumbnails.
- tiles: Vector tile data. For Original format, tiles are *.mvt files; for Compact, *.cf files.
Tiles are stored in folders by scale level, named from 0 upward. Subfolders use global column numbers; files use row numbers.
- SCI File: Metadata file describing projection, geographic range, scales, etc.
Figure: Vector Tile Directory Structure
Related Topics