MapLayer#

class MapLayer(**properties: Any)#

Superclasses: Layer, Widget, InitiallyUnowned, Object

Implemented Interfaces: Accessible, Buildable, ConstraintTarget

A Layer implementation that fetches tiles from a MapSource and draws them as a grid.

CSS nodes#

ShumatePoint has a single CSS node with the name “map-layer”.

Constructors#

class MapLayer
classmethod new(map_source: MapSource, viewport: Viewport) MapLayer#
Parameters:
  • map_source

  • viewport

Properties#

class MapLayer
props.map_source: MapSource#

Signals#

class MapLayer.signals
map_loaded(errors: bool) None#

Emitted when all the tiles in the map view are finished loading.

As the map is panned or zoomed, this signal may be emitted multiple times.

Added in version 1.4.

Parameters:

errorsTRUE if any visible tiles failed to load

symbol_clicked(event: SymbolEvent) None#

Emitted when a symbol in the map layer is clicked.

Added in version 1.1.

Parameters:

event – a SymbolEvent with details about the clicked symbol.

tile_error(tile: Tile, error: GError) None#

Emitted when a tile fails to load.

Added in version 1.4.

Parameters:
  • tile – the Tile that failed to load

  • error – the error that occurred