A layer class which implements a Data Layer with data from a ESRI Table service.

Hierarchy

Constructors

Properties

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

Memberof

APIScope

_parentLayer: undefined | LayerInstance
_sublayers: LayerInstance[]
_visibility: boolean
attribs: AttribSource
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: undefined | Layer

The internal ESRI API layer

esriSubLayer: undefined | Sublayer

The internal ESRI API sublayer. Valid only by sublayers

esriView: undefined | LayerView

The internal ESRI API layer view

expectedTime: {
    draw: number;
    load: number;
}

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

Type declaration

  • draw: number
  • load: number
extent: undefined | Extent

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. Non-feature layers will return empty string;

fields: FieldDefinition[]

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

filter: Filter
geomType: GeometryType

The geometry type of the layer.

hovertips: boolean

If the layer should show hovertips on the map

id: string

ID of this layer. Also known as the layerId.

Memberof

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

layerFormat: LayerFormat

How the layer is instantiated in the map stack

layerIdx: number

Index of the layer. Aligns to index of arcgis server, or defaults to 0 on other layers

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
loadPromFulfilled: boolean
mapLayer: boolean

If the layer type can exist on the map

maxLoadTime: number

How long layer can load for before error (milliseconds)

name: string

The name of the layer.

nameField: string

Field name that contains value considered the name of a feature. Not applicable for non-feature layers.

oidField: string

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

origRampConfig: RampLayerConfig
serviceUrl: string
sourceJson: undefined | CompactJson

This represents a file content transformed to our common consumption format. The implementation classes will handle that transformation, and common routines in this class can process it onInitiate.

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: undefined | number;
    load: undefined | number;
}

Type declaration

  • draw: undefined | number
  • load: undefined | number
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

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

    Method

    isLoaded

  • get layerExists(): boolean
  • Override for data layers. Used to determine if layer is available for use.

    Returns boolean

  • get mouseTolerance(): number
  • Get the click tolerance in pixels for this layer

    Returns number

    the mouse tolerance of this layer

  • set mouseTolerance(tolerance): void
  • Set the mouse tolerance for this layer in pixels

    Parameters

    • tolerance: number

      the new mouse tolerance

    Returns void

  • get opacity(): number
  • Returns the opacity of the layer.

    Returns number

    opacity of the layer

  • set opacity(value): void
  • Applies opacity to layer.

    Parameters

    • value: number

      the new opacity setting

    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): 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 data

    Returns boolean

    visibility of the layer data

  • set visibility(value): void
  • Applies visibility to layer data.

    Parameters

    • value: boolean

      the new visibility setting

    Returns void

Methods

  • Applies the current filter settings to the physical map layer.

    Parameters

    • Optional exclusions: string[] = []

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

    Returns void

    Function

    applySqlFilter

  • Returns a SQL WHERE condition that is combination of active filters.

    Parameters

    • Optional exclusions: string[]

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

    Returns string

    all non-excluded sql statements connected with AND operators.

    Method

    getCombinedSqlFilter

  • Gets array of object ids that currently pass any filters

    Parameters

    • Optional exclusions: string[] = []

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

    • Optional extent: Extent = undefined

      ignored for Data Layer. param exists for consistency.

    Returns Promise<undefined | number[]>

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

    Function

    getFilterOIDs

  • Gets information on a graphic in the most efficient way possible. The options parameter is ignored for data layers, since attributes is the only valid item to request

    Parameters

    • objectId: number

      the object id of the graphic to find

    • opts: GetGraphicParams

      options object for the request. Ignored for data layers

    Returns Promise<Graphic>

    resolves with a Graphic containing the requested information

  • Gets the extent where the provided object id is on the map. Can only be used on feature layers with multipoint, polyline, polygon geometry.

    Parameters

    • objectId: number

      the object id to query

    Returns Promise<Extent>

    resolves with the extent where the object id is present

  • 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

  • Returns the value of a named SQL filter on 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.

  • Private

    Attempts to get an sublayer based on the index or uid provided.

    Parameters

    • layerIdx: string | number

      the uid or numeric index of the item we are interested in

    Returns undefined | LayerInstance

    the matching feature class object, or undefined if the root was requested

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

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

    Parameters

    • Optional testScale: 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

    Function

    isOffscale

  • 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

    Method

    loadPromise

  • Requests a set of features for this layer that match the criteria of the options

    • filterSql : a where clause to apply against feature attributes
    • outFields : a string of comma separated field names. will restrict fields included in the output

    Parameters

    Returns Promise<Graphic[]>

    resolves with an array of features that satisfy the criteria

  • Requests a set of features for this layer that match the criteria of the options

    • filterGeometry : a RAMP API geometry to restrict results to
    • filterSql : a where clause to apply against feature attributes
    • includeGeometry : a boolean to indicate if result features should include the geometry
    • sourceSR : a spatial reference indicating what the source layer is encoded in. providing can assist in result geometry being of a proper resolution

    Parameters

    Returns Promise<DiscreteGraphicResult[]>

    resolves in an array of object ids and promises resolving in each feature

  • Will return an array of object ids for features in the layer that satisfy the conditions of the query options parameter.

    Parameters

    Returns Promise<number[]>

    resolves with an array of numbers (object ids)

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

  • Add a WMS layer parameter, maybe even refresh the layer

    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

    Function

    setCustomParameter

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

Generated using TypeDoc