In [1]:
Copied!
# %pip install "leafmap[maplibre]"
# %pip install "leafmap[maplibre]"
In [2]:
Copied!
import leafmap.maplibregl as leafmap
import leafmap.maplibregl as leafmap
In [3]:
Copied!
# import os
# os.environ["MAPTILER_KEY"] = "YOUR_API_KEY"
# 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.
In [4]:
Copied!
m = leafmap.Map(style="streets")
m
m = leafmap.Map(style="streets")
m
Failed to retrieve the MapTiler style. Defaulting to 'dark-matter' style.
In [5]:
Copied!
m = leafmap.Map(style="satellite")
m
m = leafmap.Map(style="satellite")
m
Failed to retrieve the MapTiler style. Defaulting to 'dark-matter' style.
In [6]:
Copied!
m = leafmap.Map(style="topo")
m
m = leafmap.Map(style="topo")
m
Failed to retrieve the MapTiler style. Defaulting to 'dark-matter' style.