SimpleMap#
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#
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
Layerto add
- get_viewport() Viewport#
Gets the map’s viewport, needed for constructing map layers that will be added to it.
- insert_overlay_layer_above(layer: Layer, sibling: Layer) None#
Inserts a map layer as an overlay on top of the base map. The layer will appear above
sibling, or at the bottom (but still above the base map) ifsiblingisNone.Added in version 1.5.
- Parameters:
layer – a
Layerto insertsibling
- insert_overlay_layer_behind(layer: Layer, sibling: Layer) None#
Inserts a map layer as an overlay on top of the base map. The layer will appear just below
sibling, or above everything else ifsiblingisNone.Added in version 1.5.
- Parameters:
layer – a
Layerto insertsibling
- remove_overlay_layer(layer: Layer) None#
Removes a layer from the map.
- Parameters:
layer – a
Layerthat was added to the map previously
Properties#
- class SimpleMap
- props.base_map_layer: MapLayer#
The
MapLayerthat displays the map source.This is a read-only property. To change the basemap, set the
map_sourceproperty.Added in version 1.4.
Signals#
- class SimpleMap.signals
- symbol_clicked(event: SymbolEvent) None#
Emitted when a symbol in the base map layer (not in overlay layers) is clicked.
Added in version 1.1.
- Parameters:
event – a
SymbolEventwith details about the clicked symbol.