
MAPTILER VECTOR HOW TO
Check VectorGrid’s documentation for more info about how to define the styling.Ĭheck out the schemas of the different MapTiler datasets VectorGrid cannot handle vector tile GL styles (yet), therefore first you have to define the styling for all the data layers with the Leaflet specific styling code. The plugin is not yet ready for drawing the basemaps with fonts etc but is very practical for other applications. Leaflet has also the ability to load and render the vector tiles directly - with the help of the VectorGrid plugin. For support, please open an issue in the mapbox-gl-leaflet repository. Note: this plugin is experimental and is not actively supported by Mapbox. Leaflet can also load and render the vector tiles directly - with the help of the mapbox-gl-leaflet plugin.

(recommended for data overlays) Vector tiles mapbox-gl-leaflet (plugin) In a second way, using the VectorGrid plugin we have to define the style for each layer this gives us more control of what we want to show on the map. The first way (the one recommended for base maps) is using the mapbox-gl-leaflet plugin, which is responsible for interpreting the GL style definition and creating the map directly. Next we will explain two ways how to create a map in Leaflet using your MapTiler maps. Your MapTiler API KEY is on your MapTiler Cloud account page or Get your FREE API key here. To use MapTiler maps you need an API KEY. To display vector tiles it is necessary to use one of the available plugins. For basemaps, it is recommended to use it with traditional raster tiles.

Leaflet doesn’t support vector tiles by default. Read more about Vector tiles in this article What are vector tiles and why you should care?

Vector tiles are rendered on the client’s side with a style, which is a small text file that defines how certain map elements look and how they are displayed. Vector maps are made of mathematical interpretations of geometric features such as points, curves or polygons.
