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

_activeKeys: string[] = []
_basemapStore: Basemap[]

Local storage of Basemap objects

_mouseFocus: boolean = false
_panInterval: any
_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
caption: MapCaptionAPI
created: boolean = false

Indicates if the map has been created

esriMap: undefined | EsriMap

The internal esri map. Avoid referencing outside of geoapi.

esriView: undefined | EsriMapView

The internal esri map view. Avoid referencing outside of geoapi.

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

List of ESRI watch handlers

mapMouseThrottle: number

The throttle level for map mouse move events

maptip: MaptipAPI
pointZoomScale: number

The default zoom level when zooming to a point feature

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.

    Memberof

    APIScope

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

  • get keysActive(): boolean
  • Returns if keys are active on map

    Memberof

    MapAPI

    Returns boolean

    • true if any pan/zoom keys are active
  • get mouseFocus(): boolean
  • Returns if map focus is caused by mouse click

    Memberof

    MapAPI

    Returns boolean

Methods

  • Adds a layer to the map Optionally can specify the layer order index

    Parameters

    • layer: LayerInstance

      the Ramp layer to add

    • index: undefined | number = undefined

      optional order index to add the layer to

    Returns Promise<void>

    a promise that resolves when the layer has been added to the map

  • Protected

    Sets the basemap to the basemap with the given id or the basemap object Throws error if basemap could not be found

    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

    Parameters

    • Optional basemap: string | Basemap

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

    Returns void

  • Creates a throttled map mouse move handler. Uses mapMouseThrottle for the throttle delay

    Returns any

    the throttled handler function

  • Get the top-most graphic at the given screen point Returns undefined if there is no point

    Parameters

    Returns Promise<undefined | GraphicHitResult>

    a promise that resolves when a graphic is hit (undefined if no graphic was hit)

  • Private

    Pauses pan interval to process zoom from keyboard

    Memberof

    MapAPI

    Parameters

    • payload: KeyboardEvent

    Returns Promise<void>

  • Processes keydown event on map and initiates panning/zooming

    Memberof

    MapAPI

    Parameters

    • payload: KeyboardEvent

    Returns void

  • Processes keyup event on map and deactivates key

    Memberof

    MapAPI

    Parameters

    • payload: KeyboardEvent

    Returns void

  • Get a pixel in screen co-ordinates corresponding to a point in map co-ordinates.

    Parameters

    • mapPoint: Point

      point on the map

    Returns ScreenPoint

    the screen point analagous to the map point

  • Removes a layer from the map and fires the LAYER_REMOVE event

    Parameters

    • layer: string | LayerInstance

      the Ramp layer or layer id/uid to remove

    Returns void

    a promise that resolves when the layer has been removed from the map

  • Removes a sublayer from the map

    Parameters

    Returns void

    a promise that resolves when the layer has been removed from the map

  • Reorders a layer on the map

    Parameters

    • layer: LayerInstance

      the RAMP layer to be moved

    • index: number

      the RAMP layer index for placing the layer

    • ignoreCosmetic: boolean = false

      indicates if cosmetic layers should be ignored during reordering

    Returns void

  • Get a point in map co-ordinates corresponding to a pixel in screen co-ordinates.

    Parameters

    • screenPoint: ScreenPoint

      pixel screen co-ord of the point on the map

    Returns Point

    the map point analagous to the screen point

  • 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.

    Parameters

    • basemapId: string

      the basemap id

    Returns boolean

    indicates if the schema has changed

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

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

    Parameters

    • newThrottle: number

      the new mapMouseThrottle value, which must be a positive number

    Returns boolean

    indicates if the value was set successfully

  • 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 the next zoom level in towards the earth. The center point will not change. In the rare case where there is no basemap, this will likely do nothing

    Returns Promise<void>

    A promise that resolves when the map has finished zooming

  • 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

  • Zooms the map to the next zoom level out away from the earth. The center point will not change. In the rare case where there is no basemap, this will likely do nothing

    Returns Promise<void>

    A promise that resolves when the map has finished zooming

  • Zooms the map to a given zoom level. The center point will not change. In the rare case where there is no basemap, this will likely do nothing

    Parameters

    • zoomLevel: number

      An integer matching the level of detail / zoom level the map should adjust to

    Returns Promise<void>

    A promise that resolves when the map has finished zooming

  • Zooms the map to the closest zoom level that will be visible for a given scale set. Does nothing if scale set is already visible for the map.

    Parameters

    Returns Promise<void>

    A promise that resolves when the map has finished zooming

Generated using TypeDoc