RAMP4 - v4.21.0
    Preparing search index...

    A layer class which implements an ESRI WMS Layer.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    _drawOrder: DrawOrder[]
    _lastFilterUpdate: string = ''
    _mouseTolerance: number
    _parentLayer: LayerInstance | undefined
    _scaleSet: ScaleSet
    _serverVisibility: boolean | undefined
    _sublayers: LayerInstance[]
    _touchTolerance: number

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

    APIScope

    canModifyLayer: boolean

    Indicates if the layer can be modified with filters.

    canReload: boolean

    Indicates if the layer can be reloaded.

    config: any = {}
    dataFormat: DataFormat

    The type of spatial data used to generate layer content

    drawState: DrawState

    State of drawing / refreshing data for a layer

    esriLayer: WMSLayer | undefined

    The internal ESRI API layer

    esriSubLayer: Sublayer | undefined

    The internal ESRI API sublayer. Valid only by sublayers

    esriView: LayerView | undefined

    The internal ESRI API layer view

    esriWatches: ResourceHandle[]
    expectedTime: LayerTimes

    Object that contains values for the expected draw/response time.

    extent: Extent | undefined

    The extent of the layer on the map

    featureCount: number

    Feature count

    fieldList: string

    Comma delimited string of field names (or '*' for all). Useful for numerous ESRI api calls. Attribute-less layers will return empty string;

    fields: FieldDefinition[]

    Array of field definitions about the given layer's fields. Attribute-less layers will have empty arrays.

    geomType: GeometryType

    The geometry type of the layer.

    id: string

    ID of this layer. Also known as the layerId.

    LayerInstance

    identify: boolean

    If the layer is set to participate in identify requests

    identifyMode: LayerIdentifyMode

    The type of logic used to identify items on the layer

    initiationState: InitiationState

    State of the initiation / termination process of the layer

    isCosmetic: boolean

    If the layer is non-interactive and only displays content on the map

    isFile: boolean

    If the layer was sourced from a file or a WFS source (which disconnects after load).

    isRemoved: boolean

    Tracks if layer is removed from map. Is false during the period "before" the layer gets added to map.

    isSublayer: boolean

    If the layer is a Sublayer

    isSystem: boolean

    If the layer is being managed by a RAMP functionality

    lastCancel: number

    Timecode value for the start of most recent cancel request. Used to avoid races between async things returning after layers cancel or reload.

    layerFormat: LayerFormat

    How the layer is instantiated in the map stack

    layerIdx: number

    Index of the layer. Aligns to index of arcgis server source, or defaults to 0 on other layers. Map Image Layers and layers that do not support attributes have a value of -1

    layerState: LayerState

    State of the actual layer on the map, such as loading, loaded, error'd.

    layerTree: TreeNode
    layerType: LayerType

    Type of layer this is (describes the overall layer)

    legend: LegendSymbology[]

    Legend symbols of the layer

    loadDefProm: DefPromise<void>
    loadPromDone: boolean

    A boolean to track whether the promise is pending (false) or fulfilled/rejected (true)

    mapLayer: boolean

    If the layer type can exist on the map

    maptipArcadeExecutor: ArcadeExecutor | undefined

    The maptip arcade executor if a maptip formula is defined

    maptipArcadeFormula: string

    Internally tracks any arcade formula for the maptip value.

    maptipField: string

    Field name that contains value considered the maptip of a feature. Not applicable for attribute-less layers. Ignored if maptipArcade is set. nameValue is used if neither are set.

    maptips: boolean

    If the layer should show maptips on the map

    mimeType: string
    name: string

    The name of the layer.

    nameArcadeExecutor: ArcadeExecutor | undefined

    The name arcade executor if a name formula is defined

    nameArcadeFormula: string

    Internally tracks any arcade formula for the name value.

    nameField: string

    Field name that contains value considered the name of a feature. Not applicable for attribute-less layers. Ignored if nameArcade is set.

    oidField: string

    Field name that contains the object ID of a feature. Not applicable for attribute-less layers.

    origRampConfig: RampLayerConfig
    sourceSR: SpatialReference | undefined

    The spatial reference of the source of geometry (e.g. map server). Undefined for non-ArcServer and non-spatial layers.

    sublayerNames: string[]
    supportsFeatures: boolean

    If the layer type can support Feature type requests and operations

    supportsIdentify: boolean

    If the layer type can support an identify request

    supportsSublayers: boolean

    If the layer has Sublayers

    timers: { draw: number | undefined; load: number | undefined }

    Tracks load and draw elapsed time

    uid: string

    Unique identifier for this layer. Randomly generated at runtime.

    url: string

    url of the service

    userAdded: boolean

    If the layer was added by user interaction during the session

    viewDefProm: DefPromise<void>

    Accessors

    • get $element(): App<Element>

      Returns App<Element>

    • get $vApp(): ComponentPublicInstance

      The instance of Vue R4MP application controlled by this InstanceAPI. This is just a shorthand for this.$iApi.$vApp.

      Returns ComponentPublicInstance

      APIScope

    • get isLoaded(): boolean

      Indicates if the layer is in a state that is makes sense to interact with. I.e. False if layer has not done it's initial load, or is in error state. Acts as a handy shortcut to inspecting the layerState.

      Returns boolean

      true if layer is loaded

      isLoaded

    • get layerExists(): boolean

      Indicates if the Esri map layer exists

      Returns boolean

    • get maptipArcade(): string

      Arcade formula to derive maptip of the feature. Empty string indicates no formula in use. Not applicable for attribute-less layers.

      Returns string

    • get mouseTolerance(): number

      Get the mouse tolerance in pixels for this layer

      Returns number

      the mouse tolerance of this layer

    • set mouseTolerance(tolerance: number): void

      Set the mouse tolerance for this layer in pixels

      Parameters

      • tolerance: number

        the new mouse tolerance

      Returns void

    • get nameArcade(): string

      Arcade formula to derive name of feature. Empty string indicates no formula in use. Not applicable for attribute-less layers.

      Returns string

    • get opacity(): number

      Returns the opacity of the layer.

      Returns number

      opacity of the layer (range between 0 and 1)

    • set opacity(value: number): void

      Applies opacity to layer.

      Parameters

      • value: number

        the new opacity setting (range between 0 and 1)

      Returns void

    • get touchTolerance(): number

      Get the touch tolerance in pixels for this layer

      Returns number

      the touch tolerance of this layer

    • set touchTolerance(tolerance: number): void

      Set the touch tolerance in pixels for this layer

      Parameters

      • tolerance: number

        the new touch tolerance

      Returns void

    • get visibility(): boolean

      Returns the visibility of the layer.

      Returns boolean

      visibility of the layer

    • set visibility(value: boolean): void

      Applies visibility to layer.

      Parameters

      • value: boolean

        the new visibility setting

      Returns void

    Methods

    • Function

      Applies the current filter settings to the physical map layer.

      applySqlFilter

      Parameters

      • exclusions: string[] = []

        list of any filters to exclude from the result. omission includes all keys

      Returns void

    • Cancels an in-progress initialize or load of the layer and places it in an Error state. Has no effect on a layer that is loaded, has been terminated, or never initiazed.

      Returns void

    • Handles click events for WMS layers (makes a WMS GetFeatureInfo call behind the scenes).

      Parameters

      • layerList: string[]

        a list of strings identifying the WMS sublayers to be queried

      • point: Point

        a RAMP Point indicating where the user clicked

      • mimeType: string

        the format to be requested for the response

      Returns Promise<any>

      a promise which resolves with the GetFeatureInfo response

    • Gets array of object ids that currently pass any filters for the layer

      Parameters

      • exclusions: string[] = []

        list of any filters keys to exclude from the result. omission includes all filters

      • extent: Extent | undefined = undefined

        if provided, the result list will only include features intersecting the extent

      Returns Promise<number[] | undefined>

      resolves with array of object ids that pass the filter. if no filters are active, resolves with undefined.

    • Gets information on a graphic in the most efficient way possible. Options object properties:

      • getGeom ; a boolean to indicate if the result should include graphic geometry
      • getAttribs ; a boolean to indicate if the result should include graphic attributes
      • getStyle ; a boolean to indicate if the result should include symbol styling information

      Parameters

      • objectId: number

        the object id of the graphic to find

      • options: GetGraphicParams

        options object for the request, see above

      Returns Promise<Graphic>

      resolves with a Graphic containing the requested information

    • Gets the extent of the geometry for a given object id. Only valid for feature layers. Not applicable to point geometry.

      Parameters

      • objectId: number

        the object id of the feature in question

      Returns Promise<Extent | undefined>

      resolves with the extent of the desired feature's geometry. Undefined for invalid requests

    • Gets the icon for a specific feature, as an SVG string.

      Parameters

      • objectId: number

        the object id of the feature to find

      Returns Promise<string>

      resolves with an svg string encoding of the icon

    • Finds the appropriate legend URLs for WMS layers.

      Parameters

      • layerList: any[]

        a list of objects identifying the WMS layers to be queried

      Returns string[]

      a list of strings containing URLs for specified layers (order is preserved)

    • Attempts to find the local (client side) geometry for a given object id. Only valid for feature layers.

      Parameters

      • objectId: number

        the object id of the feature in question

      Returns Promise<BaseGeometry | undefined>

      resolves with the geometry of the desired feature. Undefined if the feature is not local or request is invalid.

    • Returns the value of a named SQL filter for the layer.

      Parameters

      • filterKey: string

        the filter key / named filter to view

      Returns string

      the value of the where clause for the filter. Empty string if not defined.

    • Sets up the internal layer object (ESRI) and initiates the loading process. The promise returned resolves when the object exists (i.e. .esriLayer is populated). This means the layer can be added to the map.

      Returns Promise<void>

    • Function

      Indicates if the layer is not in a visible scale range.

      isOffscale

      Parameters

      • OptionaltestScale: number = undefined

        optional scale to test against. if not provided, current map scale is used.

      Returns boolean

      true if the layer is outside of a visible scale range

    • Provides a promise that resolves when the layer has finished loading. If accessing layer properties that depend on the layer being loaded, wait on this promise before accessing them.

      Returns Promise<void>

      resolves when the layer has finished loading

      loadPromise

    • Function

      Download or refresh the internal symbology for the sublayer.

      loadSymbology

      Returns void

    • Initiates actions after layer load error. Should generally only be called internally by the RAMP core.

      Parameters

      • genuineError: boolean = true

        Flag to detect error setting due to manual cancellation. Only genuine errors will raise notifications.

      Returns void

    • Attempts to reload the internal layer object (ESRI). Effectively doing a terminate then initiate, and removing/re-adding layer to the map.

      Returns Promise<void>

    • Function

      Add a WMS layer parameter, maybe even refresh the layer

      setCustomParameter

      Parameters

      • key: string

        name of the key to be created or updated

      • value: string

        value of the key

      • forceRefresh: boolean = true

        show the new fancy version of the layer or not

      Returns void

    • Sets a new arcade formula for the maptip value.

      Parameters

      • formula: string

      Returns Promise<void>

      Promise that resolves when the arcade executor has been generated.

    • Sets a new arcade formula for the name value.

      Parameters

      • formula: string

      Returns Promise<void>

      Promise that resolves when the arcade executor has been generated.

    • Applies an SQL filter to the layer. Will overwrite any existing filter for the given key. Use 1=2 for a "hide all" where clause.

      Parameters

      • filterKey: string

        the filter key / named filter to apply the SQL to

      • whereClause: string

        the WHERE clause of the filter

      Returns void

    • Start the draw/load timer for the layer, after which is a slow to load/draw notification is shown.

      Parameters

      • type: TimerType

        the type of timer to start (load or draw)

      Returns void

    • Resets the layer class to the state it was in "pre-initialize". Implementers can decide if they want to retain any state (e.g. UIDs/layerTree would be a good idea). Also an appropriate function to remove any event listeners/triggers. This would be called in situations like a layer getting deleted, or in a layer reload (initialize would be called again afterwards). Note this does not remove any layers from the map stack, that must be done by the caller.

      Returns Promise<void>

    • Updates layer load state and raises events. Should generally only be called internally by the RAMP core.

      Parameters

      • newState: LayerState

        load state the layer is entering

      • userCancel: boolean = false

        optional flag to indicate if an error state was intentional due to a user cancel request

      Returns void

    • Provides a promise that resolves when the layer view has been created.

      Returns Promise<void>

      resolves when the layer view is created

      viewPromise

    • Will zoom the map to the geometry for a given object id. Only valid for layers that support features

      Parameters

      • objectId: number

        the object id of the feature in question

      Returns Promise<boolean>

      resolves with a boolean when the zoom finishes. The value indicates if the zoom was successful