lonboard.basemap¶
lonboard.basemap.MaplibreBasemap ¶
Bases: BaseWidget
A MapLibre GL JS basemap.
mode ¶
mode = Enum(
["interleaved", "overlaid", "reverse-controlled"], default_value="overlaid"
)
The basemap integration mode.
This determines how deck.gl and MapLibre are rendered together.
-
"interleaved":The interleaved mode renders deck.gl layers into the same context created by MapLibre.
If you need to mix deck.gl layers with MapLibre layers, e.g. having deck.gl surfaces below text labels, or objects occluding each other correctly in 3D, then you have to use this option.
See BaseLayer.before_id for more information on how to interleave deck.gl layers into the Maplibre layer stack.
-
"overlaid":The overlaid mode renders deck.gl in a separate canvas inside the MapLibre's controls container.
If your use case does not require interleaving, but you still want to use certain features of maplibre-gl, such as Maplibre-based controls, then you should use this option.
-
"reverse-controlled":The reverse-controlled mode renders deck.gl above the MapLibre container and blocks any interaction to the base map.
This is the mode that Lonboard has historically used.
Default: "overlaid"
style ¶
style = BasemapUrl(PositronNoLabels)
A MapLibre-compatible basemap style.
Various styles are provided in CartoStyle.
- Type:
str, holding a URL hosting a basemap style. - Default:
CartoStyle.PositronNoLabels
__init__ ¶
__init__(
*,
mode: Literal["interleaved", "overlaid", "reverse-controlled"] = "overlaid",
style: str | CartoStyle = PositronNoLabels
) -> None
Create a MapLibre GL JS basemap.
lonboard.basemap.CartoStyle ¶
Bases: StrEnum
Maplibre-supported vector basemap styles provided by Carto.
Refer to Carto documentation for information on styles.
DarkMatter ¶
DarkMatter = 'https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json'
A dark map style with labels.

DarkMatterNoLabels ¶
DarkMatterNoLabels = (
"https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json"
)
A dark map style without labels.

Positron ¶
Positron = 'https://basemaps.cartocdn.com/gl/positron-gl-style/style.json'
A light map style with labels.

PositronNoLabels ¶
PositronNoLabels = (
"https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json"
)
A light map style without labels.

Voyager ¶
Voyager = 'https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json'
A light, colored map style with labels.

VoyagerNoLabels ¶
VoyagerNoLabels = (
"https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json"
)
A light, colored map style without labels.
