A base class for anything requiring access to the InstanceApi and instance of Vue app controlled by it.

Export

Hierarchy

Constructors

Properties

The instance of RampMap API scoped to a single Vue R4MP application.

Memberof

APIScope

_basemapStore: Basemap[]

Local storage of Basemap objects

_rampExtentSet: undefined | ExtentSet

The active extent set in RAMP API Extent Set format. Allows a quick reference to the available extents if needed.

_rampSR: undefined | SpatialReference

The map spatial reference in RAMP API Spatial Reference format. Saves us from converting from ESRI format every time it is needed

_targetDiv: undefined | string | HTMLDivElement

The viewDiv for the ESRI MapView The map will be rendered using this div object

_viewPromise: DefPromise

Internal deferred managing the view promise

created: boolean = false

Indicates if the map has been created

esriMap: undefined | Map

The internal esri map. Avoid referencing outside of geoapi.

esriView: undefined | MapView

The internal esri map view. Changes from outside of RAMP may break the instance. Use caution.

handlers: {
    handler: any;
    type: string;
}[]

List of ESRI watch handlers

Type declaration

  • handler: any
  • type: string
pointZoomScale: number

The default zoom level when zooming to a point feature

trackFirstBasemap: boolean = false

Tracks if we are watching for the first basemap to load.

Accessors

  • get $element(): App<Element>
  • Returns App<Element>

  • get $vApp(): ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}>
  • The instance of Vue R4MP application controlled by this InstanceAPI. This is just a shorthand for this.$iApi.$vApp.

    Returns ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}>

    Memberof

    APIScope

  • get viewPromise(): Promise<void>
  • A promise that resolves when the map view has been created

    Returns Promise<void>

Methods

  • Protected

    Applies the given basemap (or basemap with given id) to the esri map Throws error if basemap could not be found with the given id

    Parameters

    • basemap: string | Basemap

      the basemap id or object

    Returns void

  • Will generate the actual Map control objects and construct it on the page

    Parameters

    • config: RampMapConfig

      the config for the map

    • targetDiv: string | HTMLDivElement

      the div to be used for the map view

    Returns void

  • Protected

    Will generate a ESRI map view and add it to the page Can optionally provide the basemap or basemap id to be used when creating the map view

    This method should be overidden by child map classes

    Parameters

    • Optional basemap: string | Basemap

      the id of the basemap that should be used when creating the map view

    Returns void

  • Protected

    Searches the local basemap list for a basemap with the given id Throws error if basemap could not be found

    Parameters

    • id: string

      basemap id

    Returns Basemap

    the found basemap

  • Get the id of the currently used basemap Returns undefined if there is no map

    Returns undefined | string

    current basemap id

  • Provides the resolution of the map. This means the number of map units that is covered by one pixel.

    Returns number

    the map resolution

  • Provides the scale of the map (the scale denominator as integer)

    Returns number

    the map scale

  • Will attempt to change to another basemap if the very first basemap failed. If nothing is defined, will do nothing but manage our watching state.

    This method is overidden as needed

    Parameters

    • basemapSchemaId: string

      the basemap schema id (where the fallback is defined)

    Returns void

  • Reloads the map with the given map config and target div

    Parameters

    • config: RampMapConfig

      the config for the map

    • targetDiv: string | HTMLDivElement

      the div to be used for the map view

    Returns void

  • Set the map's basemap to the basemap with the given id. If the new basemap's tile schema differs from the current one, the map view will be refreshed

    The returned boolean indicates if the schema has changed.

    This method should be overidden by child map classes

    Parameters

    • basemapId: string

      the basemap id

    Returns boolean

    indicates if the schema has changed

    Abstract

  • Set's the map's pointZoomScale value to newScale. If newScale is not a positive number, a console error is thrown.

    The returned boolean indicates if the value has been successfully set.

    Parameters

    • newScale: number

      the new pointZoomScale value, which must be a positive number

    Returns boolean

    indicates if the value was set successfully

  • Zooms the map to a given geometry.

    Parameters

    • geom: BaseGeometry

      A RAMP API geometry to zoom the map to

    • Optional scale: number

      An optional scale value of the map. Is ignored for non-Point geometries

    • Optional animate: boolean = true

      An optional animation setting. On by default

    Returns Promise<void>

    A promise that resolves when the map has finished zooming

Generated using TypeDoc