Basemaps
Customize basemaps
Uncomment the following line to install leafmap if needed.
1 | |
1 | |
To run this notebook, you will need an API key from MapTiler. Once you have the API key, you can set it as an environment variable in your notebook or script as follows:
1 2 | |
By default, if the style parameter is not provided, the default dark-matter style from CartoDB will be used. Other styles can be found here, including positron, voyager, dark-matter-nolabels, positron-nolabels, and voyager-nolabels.
1 2 | |
If you have a MapTiler API key, you can use any basemap available in the MapTiler Basemap style gallery by specifying the style parameter. For example, style='satellite' will use the satellite basemap from MapTiler.

1 2 | |
You can also use any raster basemaps from xyzservices. For example, style='OpenTopoMap' will use the OpenTopoMap basemap.
1 2 3 | |
If you don't know the name of the basemap, you can use the add_basemap() function to get a list of basemaps and select the one you like.
1 | |
