geoview-core
    Preparing search index...

    Class API

    Class used to handle api calls (events, functions etc...)

    API

    Index

    Constructors

    Properties

    config: typeof ConfigApi = ConfigApi
    layer: typeof LayerApi = LayerApi
    plugin: typeof Plugin
    utilities: {
        core: __module;
        date: typeof DateMgt;
        geo: __module;
        projection: typeof Projection;
    }

    Methods

    • Create a new map in a given div id. GV The div MUST NOT have a geoview-map class or a warning will be shown when initMapDivFromFunctionCall is called. If is present, the div will be created with a default config

      Parameters

      • divId: string

        Id of the div to create map in (becomes the mapId)

      • mapConfig: string

        Config passed in from the function call (string or url of a config path)

      • OptionaldivHeight: number

        Optional, height of the div to inject the map in (mandatory if the map reloads)

      Returns Promise<MapViewer>

      A Promise containing the MapViewer which will be created from the configuration.

    • Deletes a map viewer instance by its ID and unmounts it from the DOM - for React.

      Parameters

      • mapId: string

        The unique identifier of the map to delete

      • deleteContainer: boolean

        True if we want to delete div from the page

      Returns Promise<void>

      Promise when the map viewer is deleted

    • Gets a map viewer instance by its ID.

      Parameters

      • mapId: string

        The unique identifier of the map to retrieve

      Returns MapViewer

      The map viewer instance if found

      If the map with the specified ID is not found

    • Asynchronously gets a map viewer instance by its ID.

      Parameters

      • mapId: string

        The unique identifier of the map to retrieve

      Returns Promise<MapViewer>

      The map viewer instance when/if found.

      If the map with the specified ID is not found

    • Returns true if a map id is already registered.

      Parameters

      • mapId: string

        The unique identifier of the map to retrieve

      Returns boolean

      True if map exist

    • Reload a map from a config object stored in store, or provided. It first removes then recreates the map.

      Parameters

      • mapId: string
      • OptionalmapConfig: TypeMapFeaturesConfig | TypeMapFeaturesInstance

        Optional map config to use for reload.

      Returns Promise<MapViewer>

      A Promise containing the MapViewer which will be created once reloaded.

    • Reload a map from a config object created using current map state. It first removes then recreates the map.

      Parameters

      • mapId: string
      • maintainGeocoreLayerNames: boolean = true

        Indicates if geocore layer names should be kept as is or returned to defaults. Set to false after a language change to update the layer names with the new language.

      Returns Promise<MapViewer>

      A Promise containing the MapViewer which will be created once reloaded.