Skip to main content

Basemap

A map view rendered headlessly: one style, or several stacked.

Usage

Basemap(
    style,
    width=800,
    height=600,
    *,
    center=None,
    zoom=None,
    bounds=None,
    crs=None,
    pixel_ratio=1.0,
    layers=None,
    labels=True,
    features=None,
    auth_token=None,
    tile_timeout_ms=10000,
    max_tiles=256,
    tile_concurrency=16,
    fail_on_tile_error=False
)

Create one with basemap(); see there for the arguments. Change the view with set_view() / set_bounds() (which return the view, so calls chain), read it with the get_* methods, and render it with render_png(), render_svg() or render_array().