MapSourceRegistry#
Superclasses: Object
Implemented Interfaces: ListModel
This object allows you to hold MapSource instances, you can access a
default set of sources with populate_defaults.
It conveniently implements ListModel to easily integrate with it.
Constructors#
- class MapSourceRegistry
- classmethod new() MapSourceRegistry#
Create a new
MapSourceRegistry.
- classmethod new_with_defaults() MapSourceRegistry#
Create a new
MapSourceRegistrywith defaults map sources. This is identical to callingpopulate_defaultsafternew().
Methods#
- class MapSourceRegistry
- add(map_source: MapSource) None#
Adds the
MapSourceto theMapSourceRegistry- Parameters:
map_source – a
MapSource
- get_by_id(id: str) MapSource | None#
Find the
MapSourcewith the corresponding id- Parameters:
id – the id of the
MapSource
- populate_defaults() None#
Populates the
MapSourceRegistrywith a default set of sources.