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
MapSourceRegistry
with defaults map sources. This is identical to callingpopulate_defaults
afternew()
.
Methods
- class MapSourceRegistry
- add(map_source: MapSource) None
Adds the
MapSource
to theMapSourceRegistry
- Parameters:
map_source – a
MapSource
- get_by_id(id: str) MapSource | None
Find the
MapSource
with the corresponding id- Parameters:
id – the id of the
MapSource
- populate_defaults() None
Populates the
MapSourceRegistry
with a default set of sources.