lets_plot.maptiles_lets_plot#

lets_plot.maptiles_lets_plot(url: str | None = None, theme: str | None = None) dict#

Make vector tiles config. Can be used individually in geom_livemap() or in every livemap via LetsPlot.set().

Parameters:
urlstr

Address of the tile server. Can be omitted if URL is already set in global settings.

theme{‘color’, ‘light’, ‘dark’, ‘bw’}

Tiles theme.

Returns:
dict

Tile provider settings.

Notes

If you are using Safari and having trouble loading tiles, try disabling the NSURLSession Websocket feature. Go to Develop -> Experimental Features -> NSURLSession Websocket to turn it off.

Also, you could use raster tiles from lets_plot.tilesets, e.g. ggplot() + geom_livemap(tiles=tilesets.OPEN_TOPO_MAP)

Examples

1from lets_plot import *
2LetsPlot.setup_html()
3tiles = maptiles_lets_plot(url='wss://tiles.datalore.jetbrains.com', theme='light')
4ggplot() + geom_livemap(tiles=tiles)