lonboard.controls¶
lonboard.controls ¶
BaseControl ¶
Bases: BaseWidget
A deck.gl or Maplibre Control.
position
class-attribute
instance-attribute
¶
position = tag(sync=True)
Position of the control in the map.
One of "top-left", "top-right", "bottom-left", or "bottom-right".
FullscreenControl ¶
Bases: BaseControl
A deck.gl FullscreenControl.
Passing this to Map.controls will add a button to the map
that allows for toggling fullscreen mode.
MultiRangeSlider ¶
Bases: VBox
A widget for multiple ranged sliders.
This is designed to be used with the DataFilterExtension when you want to filter on 2 to 4 columns on the same time.
If you have only a single filter, use an ipywidgets FloatRangeSlider directly.
Example:
from ipywidgets import FloatRangeSlider
slider1 = FloatRangeSlider(
value=(2, 5),
min=0,
max=10,
step=0.1,
description="First slider: "
)
slider2 = FloatRangeSlider(
value=(30, 40),
min=0,
max=50,
step=1,
description="Second slider: "
)
multi_slider = MultiRangeSlider([slider1, slider2])
multi_slider
Then to propagate updates to a rendered layer, call jsdlink to connect the two widgets.
from ipywidgets import jsdlink
jsdlink(
(multi_slider, "value"),
(layer, "filter_range")
)
As you change the slider, the filter_range value on the layer class should be
updated.
NavigationControl ¶
Bases: BaseControl
A deck.gl NavigationControl.
Passing this to Map.controls will add zoom and compass
buttons to the map.
show_compass
class-attribute
instance-attribute
¶
show_compass = tag(sync=True)
Whether to show the compass button.
Default True.
show_zoom
class-attribute
instance-attribute
¶
show_zoom = tag(sync=True)
Whether to show the zoom buttons.
Default True.
visualize_pitch
class-attribute
instance-attribute
¶
visualize_pitch = tag(sync=True)
Whether to enable pitch visualization.
This only has effect for Maplibre-driven maps (i.e. where
MaplibreBasemap.mode is "overlaid" or
"interleaved").
Default True.
visualize_roll
class-attribute
instance-attribute
¶
visualize_roll = tag(sync=True)
Whether to enable roll visualization.
This only has effect for Maplibre-driven maps (i.e. where
MaplibreBasemap.mode is "overlaid" or
"interleaved").
Default False.
ScaleControl ¶
Bases: BaseControl
A deck.gl ScaleControl.
Passing this to Map.controls will add a scale bar to the
map.
max_width
class-attribute
instance-attribute
¶
max_width = tag(sync=True)
The maximum width of the scale control in pixels.
This only has effect for Maplibre-driven maps (i.e. where
MaplibreBasemap.mode is "overlaid" or
"interleaved").
Default 100.
unit
class-attribute
instance-attribute
¶
unit = tag(sync=True)
The unit of the scale.
This only has effect for Maplibre-driven maps (i.e. where
MaplibreBasemap.mode is "overlaid" or
"interleaved").
One of 'metric', 'imperial', or 'nautical'. Default is 'metric'.