Skip to content

Maptiler styles

image image image

Use MapTiler styles

MapTiler has a variety of vector tile styles that can be used with MapLibre.

Uncomment the following line to install leafmap if needed.

1
# %pip install "leafmap[maplibre]"
1
import leafmap.maplibregl as leafmap

To run this notebook, you will need an API key from MapTiler. Once you have the API key, you can uncomment the following code block and replace YOUR_API_KEY with your actual API key. Then, run the code block code to set the API key as an environment variable.

1
2
# import os
# os.environ["MAPTILER_KEY"] = "YOUR_API_KEY"

Then, you can use any named style from MapTiler by setting the style parameter to the name of the style.

1
2
m = leafmap.Map(style="streets")
m
1
2
m = leafmap.Map(style="satellite")
m
1
2
m = leafmap.Map(style="topo")
m