Open Pioneer Trails Packages
    Preparing search index...

    Interface MapRegistry

    Provides access to registered map instances.

    Maps are identified by a unique id.

    Inject an instance of this service by referencing the interface name "map.MapRegistry".

    interface MapRegistry {
        "[DECLARE_SERVICE_INTERFACE]": "map.MapRegistry";
        createMapModel(mapId: string, options?: MapConfig): Promise<MapModel>;
        destroy(): void;
        expectMapModel(mapId: string): Promise<MapModel>;
        getMapModel(mapId: string): Promise<MapModel | undefined>;
        getMapModelByRawInstance(olMap: Map): MapModel | undefined;
    }

    Implements

    • Service
    Index

    Methods

    • Destroys the component. Should clean up all resources used by the component.

      Returns void

    • Returns the map model associated with the given id. Returns undefined if there is no such model.

      Parameters

      • mapId: string

      Returns Promise<MapModel | undefined>

    • Given a raw OpenLayers map instance, returns the associated MapModel - or undefined if the map is unknown to this registry.

      All OpenLayers maps created by this registry (e.g. via MapConfigProvider or createMapModel) have an associated map model.

      Parameters

      • olMap: Map

      Returns MapModel | undefined

    Properties

    "[DECLARE_SERVICE_INTERFACE]": "map.MapRegistry"