How to create tiles from vector data
In this article, you’ll learn all the important information about generating vector tiles using MapTiler Engine.
If you don’t have MapTiler Engine yet, you can download it here.
Rendering vector tiles with MapTiler Engine
Rendering vector tiles with MapTiler Engine is very easy. The application automatically prepares the output layers based on the source data. However, MapTiler Engine allows you to do more advanced operations with vector tiles. In this example, we’ll show you how to combine more data sources into one output. Supported input formats are listed in the Supported input formats table.
Testing data
If you need some sample data to test MapTiler Engine on, you can download one of the Natural Earth datasets. Testing data used in our example is the point dataset containing the world’s major airports. You can export it in any geospatial data format.
Select the workflow
Rendering workflow is automatically selected by adding vector data. Drag and drop these two or more vector data into MapTiler Engine or load them by clicking “Open a file” button.
Coordinates and geolocation
It is necessarry for any processed data to have coordinates and geographical location correctly set. In case of example datasets, there is no need to set them manually but if there was, the same steps apply as for raster rendering, except for “Assign visually”, which is not available in vector mode. Hence you need to choose a different option to set geolocation.
Once the input is ready, proceed by clicking the “Continue” button.
Choosing the output format
In the next step, we’ll select the MBTiles output format (this way, the output can be later styled using MapTiler Cloud). If you’re not sure which one to choose, please refer to the article that compares Folder, GeoPackage, and MBTiles formats. Proceed with the “Continue” button.
Creating a new layer
In the next step, you can mix more layers together or create a new one which is a combination of selected inputs. We will remove the pre-generated layers by selecting them and clicking “Remove” next to the Add button. Now we’ll create a new output layer by clicking on the “Add” button in the bottom left corner. We’ll name it “New_Layer_1”.
Adding data to the layer
If you create a new output layer, you need to specify which inputs will it include. Select the output layer on the left and click on the “Add source” button in the Source layers section, to add new input. Here you can add more than just one input layer to your output layer and also set the zoom levels for each layer separately.
Zoom 0 means your data will be rendered and visible on the map even if your users zoom out to the whole planet level. Rendering more zoom levels gives you an opportunity to easily manipulate your final file and decide later when your data will be visible, on the other hand, it increases rendering time and final file size.
Adding attributes
For now, the output layer is still empty and contains no attributes. Each input file consists of a set of attributes. We add them by selecting the input layer and clicking “Add attribute” in the Attributes section. They are listed in a table where you can add or remove them by checking the checkboxes.
In the attributes section, we can also change names to be used in the output. Once we added all of the required attributes, we are all set and we can click “Continue” to proceed to the output settings page.
Output settings
Here you are able to adjust metadata information and output tile format. If you’d like to adjust also the description field, please let us know through “Submit feedback” menu. When you are finished, you can click “Continue” and select the unique name for your output.
Publish your map
In the next page you select where you’d like to upload your tileset.MapTiler Cloud is the first and recommended option (described here). If you wish to save your data only locally, or upload it later, select “Skip upload”. Then click “Continue”.
Preview the results
When the processing is complete, you’ll see the preview of your map with your data matched with its geographical position. Use the left panel to switch layers on or off for better orientation in case your data is very dense. From here, you can either start over, edit the project or navigate to your output location.
Using your output
Now you can start using your data directly. However, for better readability, we recommend styling them. This is an easy task if you upload them to MapTiler Cloud in the MBTiles format. For more information, read the separate how-to. Hosting is possible on our MapTiler Cloud or any other public or private cloud or your own server.
Useful links
Vector feature
How to upload map tiles to MapTiler Cloud
Web and custom map hosting
MapTiler Engine workflows
Related guides
- Add a basemap from MapTiler Cloud to MapTiler Engine
- Add a basemap from MapTiler Server to MapTiler Engine
- Amazon S3 map hosting
- Coordinate reference systems
- Custom map with OpenLayers for Drupal CMS
- Custom Retina scale
- Custom watermark
- Disabled network adapters
- Estimated rendering time
- Folder vs. MBTiles vs. GeoPackage