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 {
        expectMapModel(mapId: string): Promise<MapModel>;
        getMapModel(mapId: string): Promise<undefined | MapModel>;
        getMapModelByRawInstance(olMap: Map): undefined | MapModel;
    }

    Hierarchy

    • DeclaredService<"map.MapRegistry">
      • MapRegistry
    Index

    Methods

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

      Parameters

      • mapId: string

      Returns Promise<undefined | MapModel>

    • 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) have an associated map model.

      Parameters

      • olMap: Map

      Returns undefined | MapModel