SimpleMap
-
class SimpleMap(**properties: Any)
Superclasses: Widget
, InitiallyUnowned
, Object
Implemented Interfaces: Accessible
, Buildable
, ConstraintTarget
A ready-to-use map Widget
.If you want to use your own implementation,
you can look at the Map
widget.
The simple map contains a zoom widget, a License
at the bottom,
a Scale
and a Compass
.
Constructors
-
class SimpleMap
-
classmethod new() → SimpleMap
Methods
-
class SimpleMap
-
add_overlay_layer(layer: Layer) → None
Adds a map layer as an overlay on top of the base map.
- Parameters:
layer – a Layer
to add
-
get_compass() → Compass
Gets the compass widget for the map.
-
get_license() → License
Gets the license widget for the map.
-
get_map() → Map
Gets the SimpleMap
's underlying Map
.
-
get_map_source() → MapSource
Gets the map source for the current base layer.
-
get_scale() → Scale
Gets the scale widget for the map.
-
get_show_zoom_buttons() → bool
Gets whether or not the zoom buttons are shown.
-
get_viewport() → Viewport
Gets the map’s viewport, needed for constructing map layers that will be added
to it.
-
insert_overlay_layer(layer: Layer, idx: int) → None
- Parameters:
-
-
remove_overlay_layer(layer: Layer) → None
Removes a layer from the map.
- Parameters:
layer – a Layer
that was added to the map previously
-
set_map_source(map_source: MapSource | None = None) → None
Sets the source for the base map.
- Parameters:
map_source – a MapSource
-
set_show_zoom_buttons(show_zoom_buttons: bool) → None
Sets whether or not the zoom buttons are shown.
- Parameters:
show_zoom_buttons – True
to show the zoom buttons, False
to hide them
Properties
-
class SimpleMap
-
props.compass: Compass
The type of the None singleton.
-
props.license: License
The type of the None singleton.
-
props.map: Map
-
props.map_source: MapSource
The type of the None singleton.
-
props.scale: Scale
The type of the None singleton.
-
props.show_zoom_buttons: bool
The type of the None singleton.
-
props.viewport: Viewport
The type of the None singleton.
Signals
-
class SimpleMap.signals
-
symbol_clicked(event: SymbolEvent) → None
The type of the None singleton.
- Parameters:
event – a SymbolEvent
with details about the clicked symbol.