Options
All
  • Public
  • Public/Protected
  • All
Menu

Specialized esri feature layer that exists in a disconnected state (no URL).

Hierarchy

  • FeatureLayer
    • LocalFeatureLayer

Index

Constructors

Properties

Methods

Constructors

constructor

  • Create a LocalFeatureLayer from a feature layer that is serialized as a FeatureCollection.

    Parameters

    • featureCollectionObject: WebMapLayer

    Returns LocalFeatureLayer

Properties

advancedQueryCapabilities

advancedQueryCapabilities: any

An object that contains service level metadata about whether or not the layer supports queries using statistics, order by fields, DISTINCT, pagination, query with distance, and returning queries with extents.

allowGeometryUpdates

allowGeometryUpdates: boolean

Returns true if the geometry of the features in the layer can be edited, false otherwise.

allowUpdateWithoutMValues

allowUpdateWithoutMValues: boolean

Indicates whether attribute features containing m-values can be edited.

attributionDataUrl

attributionDataUrl: string

The URL, when available, where the layer's attribution data is stored.

capabilities

capabilities: string

Information about the capabilities enabled for this layer.

className

className: string

class attribute of the layer's node.

copyright

copyright: string

Copyright information for the layer.

credential

credential: Credential

Provides credential information for the layer such as userid and token if the layer represents a resource that is secured with token-based authentication.

dataAttributes

dataAttributes: string | string[]

List of attribute fields added as custom data attributes to graphics node.

defaultDefinitionExpression

defaultDefinitionExpression: string

Metadata describing the default definition expression for the layer as defined by the service.

defaultVisibility

defaultVisibility: boolean

Indicates the default visibility for the layer.

description

description: string

The description of the layer as defined in the map service.

displayField

displayField: string

The name of the layer's primary display field.

editFieldsInfo

editFieldsInfo: any

Indicates the field names for the editor fields.

fields

fields: Field[]

The array of fields in the layer.

fullExtent

fullExtent: Extent

The full extent of the layer.

gdbVersion

gdbVersion: string

The geodatabase version.

geometryType

geometryType: string

Geometry type of the features in the layer.

globalIdField

globalIdField: string

The globalIdField for the layer.

graphics

graphics: Graphic[]

Array of features in the layer.

hasAttachments

hasAttachments: boolean

True if attachments are enabled on the feature layer.

hasAttributionData

hasAttributionData: boolean

When true, the layer has attribution data.

htmlPopupType

htmlPopupType: string

The html popup type defined for the layer.

id

id: string

ID assigned to the layer.

infoTemplate

infoTemplate: InfoTemplate

The info template for the layer.

labelingInfo

labelingInfo: LabelClass[]

Label definition for this layer, specified as an array of label classes.

layerId

layerId: number

Unique ID of the layer that the FeatureLayer was constructed against.

loadError

loadError: Error

Set if the layer failed to load.

loaded

loaded: boolean

When the layer is loaded, the value becomes "true", and layer properties can be accessed.

maxAllowableOffset

maxAllowableOffset: number

The maximum allowable offset, only applicable for layers that are not editable.

maxRecordCount

maxRecordCount: number

The maximum number of results that will be returned from a query.

maxScale

maxScale: number

Maximum visible scale for the layer.

minScale

minScale: number

Minimum visible scale for the layer.

multipatchOption

multipatchOption: string

Supports feature services whose data source is a multipatch featureclass.

name

name: string

The name of the layer as defined in the map service.

objectIdField

objectIdField: string

The name of the field that contains the Object ID field for the layer.

opacity

opacity: number

Opacity or transparency of layer.

ownershipBasedAccessControlForFeatures

ownershipBasedAccessControlForFeatures: any

Indicates the ownership access control configuration.

refreshInterval

refreshInterval: number

Refresh interval of the layer in minutes.

relationships

relationships: Relationship[]

Each element in the array is an object that describes the layer's relationship with another layer or table.

renderer

renderer: Renderer

The renderer for the layer.

showAttribution

showAttribution: boolean

When true, the layer's attribution is displayed on the map.

showLabels

showLabels: boolean

Determines if labels are displayed.

source

source: LayerSource

The dynamic layer or table source.

styling

styling: boolean

Indicates whether the layer is responsible for styling graphics.

supportsAdvancedQueries

supportsAdvancedQueries: boolean

When true, the layer supports orderByFields in a query operation.

supportsAttachmentsByUploadId

supportsAttachmentsByUploadId: boolean

When true, the layer supports uploading attachments with Uploads REST operation, which then can be used in the Add Attachment or Update Attachment REST operations.

supportsCalculate

supportsCalculate: boolean

When true, the layer supports the Calculate REST operation when updating features.

supportsStatistics

supportsStatistics: boolean

When true, the layer supports statistical functions in query operations.

surfaceType

surfaceType: string

Type of vector graphics surface used to draw graphics.

suspended

suspended: boolean

When true, the layer is suspended.

templates

templates: FeatureTemplate[]

An array of feature templates defined in the Feature Service layer.

timeInfo

timeInfo: TimeInfo

Time information for the layer, such as start time field, end time field, track id field, layers time extent and the draw time interval.

type

type: string

Specifies the type of layer.

typeIdField

typeIdField: string

The field that represents the Type ID field.

types

types: FeatureType[]

An array of sub types defined in the Feature Service layer.

url

url: string

URL to the ArcGIS Server REST resource that represents a map service.

version

version: number

The version of ArcGIS Server where the layer is published.

visible

visible: boolean

Visibility of the layer.

visibleAtMapScale

visibleAtMapScale: boolean

When true, the layer is visible at the current map scale.

webglEnabled

webglEnabled: boolean

Indicates if WebGL is enabled on the layer.

Static MODE_AUTO

MODE_AUTO: any

Delegate to either on-demand or snapshot mode depending on the characteristics of the service.

Static MODE_ONDEMAND

MODE_ONDEMAND: any

In on-demand mode, the feature layer retrieves features from the server when needed.

Static MODE_SELECTION

MODE_SELECTION: any

In selection mode, features are retrieved from the server only when they are selected.

Static MODE_SNAPSHOT

MODE_SNAPSHOT: any

In snapshot mode, the feature layer retrieves all the features from the associated layer resource and displays them as graphics on the client.

Static POPUP_HTML_TEXT

POPUP_HTML_TEXT: any

The popup displays content in HTML/TEXT.

Static POPUP_NONE

POPUP_NONE: any

No popup type defined.

Static POPUP_URL

POPUP_URL: any

The popup displays the contents of a URL.

Static SELECTION_ADD

SELECTION_ADD: any

Adds features to the current selection set.

Static SELECTION_NEW

SELECTION_NEW: any

Creates a new selection.

Static SELECTION_SUBTRACT

SELECTION_SUBTRACT: any

Removes features from the current selection.

Methods

add

  • add(graphic: Graphic): Graphic
  • Adds a graphic.

    Parameters

    • graphic: Graphic

      The graphic to add.

    Returns Graphic

addAttachment

  • addAttachment(objectId: number, formNode: HTMLFormElement, callback?: Function, errback?: Function): any
  • Add an attachment to the feature specified by the ObjectId.

    Parameters

    • objectId: number

      The ObjectId of the feature to which the attachment is added.

    • formNode: HTMLFormElement

      HTML form that contains a file upload field pointing to the file to be added as an attachment.

    • Optional callback: Function

      The function to call when the method has completed.

    • Optional errback: Function

      An error object is returned if an error occurs during task execution.

    Returns any

applyEdits

  • applyEdits(adds?: Graphic[], updates?: Graphic[], deletes?: Graphic[], callback?: Function, errback?: Function): any
  • Apply edits to the feature layer.

    Parameters

    • Optional adds: Graphic[]

      Array of features to add to the layer in the feature service.

    • Optional updates: Graphic[]

      Array of features whose geometry and/or attributes have changed.

    • Optional deletes: Graphic[]

      Array of features to delete.

    • Optional callback: Function

      This function will be called when the operation is complete.

    • Optional errback: Function

      An error object is returned if an error occurs.

    Returns any

attr

  • attr(name: string, value: string): Layer
  • Adds a new attribute or changes the value of an existing attribute on the layer's node.

    Parameters

    • name: string

      The name of the attribute.

    • value: string

      The value of the attribute.

    Returns Layer

clear

  • clear(): void
  • Clears all graphics.

    Returns void

clearSelection

  • clearSelection(): FeatureLayer
  • Clears the current selection.

    Returns FeatureLayer

deleteAttachments

  • deleteAttachments(objectId: number, attachmentIds: number[], callback?: Function, errback?: Function): any
  • Delete one or more attachments for the feature specified by the input ObjectId.

    Parameters

    • objectId: number

      The ObjectId of the feature from which the attachment is removed.

    • attachmentIds: number[]

      The array of attachment ids to delete.

    • Optional callback: Function

      The function to call when the method has completed.

    • Optional errback: Function

      An error object is returned if an error occurs.

    Returns any

disableFeatureReduction

  • disableFeatureReduction(): void
  • Disables feature reduction (for example clustering) on the layer.

    Returns void

disableMouseEvents

  • disableMouseEvents(): void
  • Disables all mouse events on the graphics layer.

    Returns void

enableFeatureReduction

  • enableFeatureReduction(): void
  • Enables feature reduction (for example clustering) on the layer using the options set in setFeatureReduction().

    Returns void

enableMouseEvents

  • enableMouseEvents(): void
  • Enables all mouse events on the graphics layer.

    Returns void

getAggregateGraphics

  • getAggregateGraphics(): Graphic[]
  • Returns graphics representing the aggregation of several point features clustered together.

    Returns Graphic[]

getAttributionData

  • getAttributionData(): any
  • Asynchrously returns custom data for the layer when available.

    Returns any

getDefinitionExpression

  • getDefinitionExpression(): string
  • Returns the current definition expression.

    Returns string

getDomain

  • getDomain(fieldName: string, options?: any): Domain
  • Returns the Domain associated with the given field name.

    Parameters

    • fieldName: string

      Name of the attribute field.

    • Optional options: any

      Please see the options object specification table below.

    Returns Domain

getEditCapabilities

  • getEditCapabilities(options?: any): any
  • Returns an object that describes the edit capabilities of the layer.

    Parameters

    • Optional options: any

      If the layer supports ownership based access control, use the options to determine if the specified user can edit features.

    Returns any

getEditInfo

  • getEditInfo(feature: Graphic, options?: any): any
  • Returns an object describing the most recent edit operation performed on the given feature, if available.

    Parameters

    • feature: Graphic

      The feature to get the edit info for.

    • Optional options: any

      See the object specifications table below for the structure of the options object.

    Returns any

getEditSummary

  • getEditSummary(feature: Graphic, options?: any): string
  • Returns a localized summary of the last edit operation performed on the given feature, if available.

    Parameters

    • feature: Graphic

      The feature to get the edit summary for.

    • Optional options: any

      See the object specifications table below for the structure of the options object.

    Returns string

getFeatureReduction

  • getFeatureReduction(): any
  • Returns the options used to reduce the number of features visualized by the layer (for example clustering).

    Returns any

getField

  • getField(fieldName: string): Field
  • Returns the Field given the specified field name.

    Parameters

    • fieldName: string

      Name of the attribute field.

    Returns Field

getMap

  • getMap(): Map
  • Returns reference to the map control the layer is added to.

    Returns Map

getMaxAllowableOffset

  • getMaxAllowableOffset(): number
  • Returns the current value of the maxAllowableOffset used by the layer.

    Returns number

getNode

  • getNode(): HTMLElement
  • Returns the layer's DOM node.

    Returns HTMLElement

getOrderByFields

  • getOrderByFields(): string[]
  • Returns the list of fields used to order features by.

    Returns string[]

getSelectedFeatures

  • getSelectedFeatures(): Graphic[]
  • Gets the currently selected features.

    Returns Graphic[]

getSelectionSymbol

  • getSelectionSymbol(): Symbol
  • Gets the current selection symbol.

    Returns Symbol

getSingleGraphics

  • getSingleGraphics(): Graphic[]
  • Returns graphics from the layer that are not represented by aggregate graphics when feature reduction (such as clustering) is enabled.

    Returns Graphic[]

getTimeDefinition

  • getTimeDefinition(): TimeExtent
  • Get the current time definition applied to the feature layer.

    Returns TimeExtent

getType

  • getType(feature: Graphic): FeatureType
  • Returns a FeatureType describing the feature's type.

    Parameters

    • feature: Graphic

      A feature from this layer.

    Returns FeatureType

hasUpdateError

  • hasUpdateError(): void
  • Indicates whether an error is thrown after the layer updates.

    Returns void

hasWebGLSurface

  • hasWebGLSurface(): boolean
  • Indicates if the layer is rendered in WebGL.

    Returns boolean

hasXYFootprint

  • hasXYFootprint(): boolean
  • Returns true if geometryType is esriGeometryMultipatch and multipatchOption is xyFootprint.

    Returns boolean

hide

  • hide(): void
  • Sets the visibility of the layer to "false".

    Returns void

isEditable

  • isEditable(): boolean
  • Returns true if the FeatureLayer is editable.

    Returns boolean

isFeatureReductionActive

  • isFeatureReductionActive(): boolean
  • Indicates if feature reduction (for example clustering) is active in the view.

    Returns boolean

isFeatureReductionEnabled

  • isFeatureReductionEnabled(): boolean
  • Indicates if feature reduction (for example clustering) is enabled.

    Returns boolean

isVisibleAtScale

  • isVisibleAtScale(scale: number): boolean
  • Returns true if the layer is visible at the given scale.

    Parameters

    • scale: number

      The scale at which to check if the layer is visible.

    Returns boolean

on

  • on(type: "add-attachment-complete", listener: function): Handle
  • on(type: "before-apply-edits", listener: function): Handle
  • on(type: "capabilities-change", listener: function): Handle
  • on(type: "dbl-click", listener: function): Handle
  • on(type: "delete-attachments-complete", listener: function): Handle
  • on(type: "edits-complete", listener: function): Handle
  • on(type: "gdb-version-change", listener: function): Handle
  • on(type: "labeling-info-change", listener: function): Handle
  • on(type: "query-attachment-infos-complete", listener: function): Handle
  • on(type: "query-count-complete", listener: function): Handle
  • on(type: "query-extent-complete", listener: function): Handle
  • on(type: "query-features-complete", listener: function): Handle
  • on(type: "query-ids-complete", listener: function): Handle
  • on(type: "query-limit-exceeded", listener: function): Handle
  • on(type: "query-related-features-complete", listener: function): Handle
  • on(type: "refresh-tick", listener: function): Handle
  • on(type: "resume", listener: function): Handle
  • on(type: "scale-range-change", listener: function): Handle
  • on(type: "scale-visibility-change", listener: function): Handle
  • on(type: "selection-clear", listener: function): Handle
  • on(type: "selection-complete", listener: function): Handle
  • on(type: "show-labels-change", listener: function): Handle
  • on(type: "suspend", listener: function): Handle
  • on(type: "update-end", listener: function): Handle
  • on(type: "update-start", listener: function): Handle
  • on(type: string, listener: function): Handle
  • Fires when addAttachments() is complete.

    Parameters

    • type: "add-attachment-complete"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • result: FeatureEditResult
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fired before edits are applied to the feature layer.

    Parameters

    • type: "before-apply-edits"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • adds: Graphic[]
            • deletes: Graphic[]
            • target: FeatureLayer
            • updates: Graphic[]

          Returns void

    Returns Handle

  • Fired when the capabilities of the layer are modified using the setEditable method.

    Parameters

    • type: "capabilities-change"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fires when a feature has been double clicked.

    Parameters

    • type: "dbl-click"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • event: any
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fires when deleteAttachments is complete.

    Parameters

    • type: "delete-attachments-complete"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • results: any[]
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fires after applyEdits() is complete.

    Parameters

    • type: "edits-complete"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • adds: FeatureEditResult[]
            • deletes: FeatureEditResult[]
            • target: FeatureLayer
            • updates: FeatureEditResult[]

          Returns void

    Returns Handle

  • Fired when the geodatabase version is switched.

    Parameters

    • type: "gdb-version-change"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fired when labeling info on the layer changes.

    Parameters

    • type: "labeling-info-change"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fires when queryAttachmentInfos method is called.

    Parameters

    • type: "query-attachment-infos-complete"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • info: any[]
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fires when the query for the count is complete.

    Parameters

    • type: "query-count-complete"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • count: number
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fires when queryExtent method has completed.

    Parameters

    • type: "query-extent-complete"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • count: number
            • extent: Extent
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fires when queryFeatures() is complete.

    Parameters

    • type: "query-features-complete"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • featureSet: FeatureSet
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fires when queryIds() is complete.

    Parameters

    • type: "query-ids-complete"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • objectIds: number[]
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fired when the feature layer could not draw all the features due to a maxRecordCount limitation on a query operation.

    Parameters

    • type: "query-limit-exceeded"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fires when queryRelatedFeatures() is complete.

    Parameters

    • type: "query-related-features-complete"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • relatedFeatures: any
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fires right before the actual refresh kicks in for the layer, and only fires when the refresh is triggered by the refreshInterval.

    Parameters

    • type: "refresh-tick"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fires when a layer resumes drawing.

    Parameters

    • type: "resume"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fires when a layer's minScale and/or maxScale is changed.

    Parameters

    • type: "scale-range-change"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fires when a layer's scale visibility changes.

    Parameters

    • type: "scale-visibility-change"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fires after clearSelection has been called.

    Parameters

    • type: "selection-clear"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fires when selectFeatures() completes.

    Parameters

    • type: "selection-complete"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • features: Graphic[]
            • method: number
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fired when the feature layer's labels are changed.

    Parameters

    • type: "show-labels-change"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fires when a layer suspends drawing.

    Parameters

    • type: "suspend"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fired when the layer has finished updating its content.

    Parameters

    • type: "update-end"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • error: Error
            • info: any
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Fired when the layer begins to update its content.

    Parameters

    • type: "update-start"
    • listener: function
        • (event: object): void
        • Parameters

          • event: object
            • target: FeatureLayer

          Returns void

    Returns Handle

  • Parameters

    • type: string
    • listener: function
        • (event: any): void
        • Parameters

          • event: any

          Returns void

    Returns Handle

queryAttachmentInfos

  • queryAttachmentInfos(objectId: number, callback?: Function, errback?: Function): any
  • Query for information about attachments associated with the specified ObjectIds.

    Parameters

    • objectId: number

      The ObjectId for the feature to query for attachment information.

    • Optional callback: Function

      The function to call when the method has completed.

    • Optional errback: Function

      An error object is returned if an error occurs.

    Returns any

queryCount

  • queryCount(query: Query, callback?: Function, errback?: Function): any
  • Get a count of the number of features that satisfy the input query.

    Parameters

    • query: Query

      The input query.

    • Optional callback: Function

      The function to call when the method has completed.

    • Optional errback: Function

      An error object is returned if an error occurs.

    Returns any

queryExtent

  • queryExtent(query: Query, callback?: Function, errback?: Function): any
  • Get the extent of features that satisfy the input query.

    Parameters

    • query: Query

      The query definition.

    • Optional callback: Function

      The function called when the method has completed.

    • Optional errback: Function

      The function called when error occurred.

    Returns any

queryFeatures

  • queryFeatures(originalQuery: Query, callback?: function, errback?: function): any
  • Special query handling for local feature layers, overriding queryFeatures of the Esri API. The Esri API allows only simple extent-based queries to be performed clientside. For more complex queries (involving polygons, for example), the Esri API will query the server. Local feature layers, which exist in a disconnected state (no URL), have no associated server endpoint available to query. In order to perform queries with complex geometry on local feature layers, this method performs the query with a simplified version of the geometry (an extent) which yields false positives, which we then manually filter out by using the Esri geometry engine.

    Parameters

    • originalQuery: Query
    • Optional callback: function
        • (fs: FeatureSet): void
        • Parameters

          • fs: FeatureSet

          Returns void

    • Optional errback: function
        • (err: Error): void
        • Parameters

          • err: Error

          Returns void

    Returns any

queryIds

  • queryIds(query: Query, callback?: Function, errback?: Function): any
  • Query for ObjectIds.

    Parameters

    • query: Query

      The input query.

    • Optional callback: Function

      The function to call when the method has completed.

    • Optional errback: Function

      An error object is returned if an error occurs.

    Returns any

queryRelatedFeatures

  • queryRelatedFeatures(relQuery: RelationshipQuery, callback?: Function, errback?: Function): any
  • Query features or records, from another layer or table, related to features in this layer.

    Parameters

    • relQuery: RelationshipQuery

      The input query.

    • Optional callback: Function

      The function to call when the method has completed.

    • Optional errback: Function

      An error object is returned if an error occurs.

    Returns any

redraw

  • redraw(): void
  • Redraws all the graphics in the graphics layer.

    Returns void

refresh

  • refresh(): void
  • Refreshes the features in the feature layer.

    Returns void

remove

  • remove(graphic: Graphic): Graphic
  • Removes a graphic.

    Parameters

    • graphic: Graphic

      The graphic to remove.

    Returns Graphic

resume

  • resume(): void
  • Resumes layer drawing.

    Returns void

selectFeatures

  • selectFeatures(query: Query, selectionMethod?: number, callback?: Function, errback?: Function): any
  • Selects features from the FeatureLayer.

    Parameters

    • query: Query

      The input query.

    • Optional selectionMethod: number

      The selection method defines how the rest of the selection is combined with the existing selection.

    • Optional callback: Function

      The function to call when the method has completed.

    • Optional errback: Function

      An error object is returned if an error occurs.

    Returns any

setAutoGeneralize

  • setAutoGeneralize(enable: boolean): FeatureLayer
  • Enable or disable auto generalization for the layer.

    Parameters

    • enable: boolean

      When true, auto generalize is enabled.

    Returns FeatureLayer

setDefinitionExpression

  • setDefinitionExpression(expression: string): FeatureLayer
  • Sets the definition expression for the FeatureLayer.

    Parameters

    • expression: string

      The definition expression to apply.

    Returns FeatureLayer

setEditable

  • setEditable(editable: boolean): FeatureLayer
  • Set the editability of feature layers created from a feature collection.

    Parameters

    • editable: boolean

      When true, the layer will be set as editable.

    Returns FeatureLayer

setFeatureReduction

  • setFeatureReduction(options: any): void
  • Sets feature reduction options on the layer (for example clustering options).

    Parameters

    • options: any

      Options for reducing (or aggregating) the features in the map.

    Returns void

setGDBVersion

  • setGDBVersion(versionName: string): FeatureLayer
  • Set the layer's data source to the specified geodatabase version.

    Parameters

    • versionName: string

      The name of the geodatabase version to use as the layer's data source.

    Returns FeatureLayer

setInfoTemplate

  • setInfoTemplate(infoTemplate: InfoTemplate): void
  • Specify or change the info template for a layer.

    Parameters

    • infoTemplate: InfoTemplate

      The new info template.

    Returns void

setLabelingInfo

  • setLabelingInfo(labelingInfo: LabelClass[]): void
  • Sets labeling info on the layer.

    Parameters

    • labelingInfo: LabelClass[]

      This is the label definition for this layer, specified as an array of label classes.

    Returns void

setMaxAllowableOffset

  • setMaxAllowableOffset(offset: number): void
  • Sets the maximum allowable offset used when generalizing geometries.

    Parameters

    • offset: number

      The maximum allowable offset.

    Returns void

setMaxScale

  • setMaxScale(scale: number): void
  • Set the maximum scale for the layer.

    Parameters

    • scale: number

      The maximum scale at which the layer is visible.

    Returns void

setMinScale

  • setMinScale(scale: number): void
  • Set the minimum scale for the layer.

    Parameters

    • scale: number

      The minimum scale at which the layer is visible.

    Returns void

setOpacity

  • setOpacity(opacity: number): void
  • Initial opacity or transparency of layer.

    Parameters

    • opacity: number

      Value from 0 to 1, where 0 is 100% transparent and 1 has no transparency.

    Returns void

setRefreshInterval

  • setRefreshInterval(interval: number): Layer
  • Changes the layer's refresh interval to the given value (in minutes).

    Parameters

    • interval: number

      Refresh interval of the layer in minutes.

    Returns Layer

setRenderer

  • setRenderer(renderer: Renderer): void
  • Set the renderer for the feature layer.

    Parameters

    • renderer: Renderer

      The renderer to apply to the feature layer

    Returns void

setScaleRange

  • setScaleRange(minScale: number, maxScale: number): void
  • Set the scale range for the layer.

    Parameters

    • minScale: number

      The minimum scale for the layer.

    • maxScale: number

      The maximum scale for the layer.

    Returns void

setSelectionSymbol

  • setSelectionSymbol(symbol: Symbol): FeatureLayer
  • Sets the selection symbol for the feature layer.

    Parameters

    • symbol: Symbol

      Symbol for the current selection.

    Returns FeatureLayer

setShowLabels

  • setShowLabels(showLabels: boolean): void
  • Sets whether to display labels or not.

    Parameters

    • showLabels: boolean

      Set to true to show labels.

    Returns void

setTimeDefinition

  • setTimeDefinition(definition: TimeExtent): FeatureLayer
  • Sets the time definition for the feature layer.

    Parameters

    • definition: TimeExtent

      The new time extent used to filter the layer.

    Returns FeatureLayer

setTimeOffset

  • setTimeOffset(offsetValue: number, offsetUnits: string): FeatureLayer
  • Time offset allows you to display the features at a different time so they can be overlaid on top of previous or future time periods.

    Parameters

    • offsetValue: number

      The length of time to offset from "this" time.

    • offsetUnits: string

      Units in which the offset is specified.

    Returns FeatureLayer

setUseMapTime

  • setUseMapTime(update: boolean): void
  • Determine if the layer will update its content based on the map's current time extent.

    Parameters

    • update: boolean

      When false the layer will not update its content based on the map's time extent.

    Returns void

setVisibility

  • setVisibility(isVisible: boolean): void
  • Sets the visibility of the layer.

    Parameters

    • isVisible: boolean

      Set the visibility of the layer.

    Returns void

setWebGLEnabled

  • setWebGLEnabled(enable: boolean): void
  • Toggles WebGL rendering on/off on the layer.

    Parameters

    • enable: boolean

      Indicates whether to enable WebGL on the layer.

    Returns void

show

  • show(): void
  • Sets the visibility of the layer to "true".

    Returns void

suspend

  • suspend(): void
  • Suspends layer drawing.

    Returns void

toJson

  • toJson(): any
  • Returns an easily serializable object representation of the layer.

    Returns any