Last updated

API / geotoolkit / map / sources / ArcGISFeature / ArcGISFeature

Class: ArcGISFeature

sources.ArcGISFeature.ArcGISFeature

Vector source that allows user to get features from ArcGIS FeatureService server. Supports ArcGIS version 10.0 and higher.

Hierarchy

Table of contents

Constructors
Methods
Css Properties
Name Type Description
systemstringInitial data coordinate system
urlstringData server url

Contents

Constructors

new ArcGISFeature(options)

new ArcGISFeature(options?)

Parameters

Name Type Description
Optional optionsOptionsoptions

Overrides

Vector.constructor

Methods

addFeatures

addFeatures(features, needTransform?): ArcGISFeature

Notifies source to add features.

Parameters

Name Type Description
featuresAbstractFeature[]features to add
Optional needTransformbooleantrue if features should be transformed to the map coordinates

Returns

ArcGISFeature

this

Inherited from

Vector.addFeatures


clear

clear(): ArcGISFeature

Clears all the data.

Returns

ArcGISFeature

this

Inherited from

Vector.clear


clearFeatures

clearFeatures(): ArcGISFeature

Notifies source to remove all features added.

Returns

ArcGISFeature

this

Inherited from

Vector.clearFeatures


dispose

dispose(): void

Disposes this source, once disposed it should not be used anymore.

Returns

void

Overrides

Vector.dispose


getAnnotationShape

getAnnotationShape(): Text

Returns annotation's text shape parsed from the server (for singlelayer servers basically) Should be used asynchronically after loadServerData() method is called

Returns

Text


getClassName

getClassName(): string

Returns

string

Inherited from

Vector.getClassName


getCopyright

getCopyright(): string

Returns copyright information.

Returns

string

Inherited from

Vector.getCopyright


getDataLoader

Protected getDataLoader(): AbstractLoader

Returns server data loader (if exists)

Returns

AbstractLoader

Inherited from

Vector.getDataLoader


getGeometryPrecision

getGeometryPrecision(): number

Returns number of decimal places in requested geometry values

Returns

number


getGlobalAlpha

getGlobalAlpha(): number

Returns the server layer's global alpha (for singlelayer servers basically) Should be used asynchronically after loadServerData() method is called

Returns

number


getInitialCoordinateSystem

getInitialCoordinateSystem(): AbstractSystem

Gets current data initial coordinate system.

Returns

AbstractSystem

Inherited from

Vector.getInitialCoordinateSystem


getInitialModelLimits

getInitialModelLimits(): Rect

Returns layer initial extent rectangle

Returns

Rect


getLayerSource

getLayerSource(id): ArcGISFeature

Returns separate feature source for the given layer (for the multilayer server source) Should be used asynchronically after loadServerData() method is called

Parameters

Name Type Description
idstringrequired layer id

Returns

ArcGISFeature

source feature source for sublayer


getLayers

getLayers(): LayerServerData[]

Returns the layers data array (for the multilayer server source) Should be used asynchronically after loadServerData() method is called

Returns

LayerServerData[]


getMapCoordinateSystem

getMapCoordinateSystem(): AbstractSystem

Gets current map coordinate system.

Returns

AbstractSystem

Inherited from

Vector.getMapCoordinateSystem


getModelLimits

getModelLimits(): Rect

Returns the current data model limits (presumably loaded from the server if it's settled)

Returns

Rect

Inherited from

Vector.getModelLimits


getProperties

getProperties(): OptionsOut

Returns properties

Returns

OptionsOut

properties

Inherited from

Vector.getProperties


getRequestFields

getRequestFields(): string[] | "*"

Returns an array of fields to be requested from server

Returns

string[] | "*"


getRequestResolution

getRequestResolution(): number

Gets the grid size for layer partitioning that is used for server requests

Returns

number

Inherited from

Vector.getRequestResolution


getScaleRange

getScaleRange(): number[]

Returns scale visible range for the server's layer (for singlelayer servers basically) Should be used asynchronically after loadServerData() method is called

Returns

number[]

[minScale, maxScale]


getServerData

getServerData(): JSONObject | XMLDocument

Returns server data loaded from the server Should be used asynchronically after loadServerData() method is called

Returns

JSONObject | XMLDocument

Inherited from

Vector.getServerData


getServerURL

getServerURL(): string | string[]

Gets the server url that is currently used for requests

Returns

string | string[]

server url

Inherited from

Vector.getServerURL


getToken

getToken(): string

Returns the authorization token (if set, null otherwise)

Returns

string


getTransformerFromMap

getTransformerFromMap(): Transformer

Gets transformer to transform data from map coordinate system

Returns

Transformer

Inherited from

Vector.getTransformerFromMap


getTransformerToMap

getTransformerToMap(): Transformer

Gets transformer to transform data to map coordinate system

Returns

Transformer

Inherited from

Vector.getTransformerToMap


getUniqueField

getUniqueField(): string

Gets the unique identifier for the dataset

Returns

string

field

Inherited from

Vector.getUniqueField


getVisibleLayers

getVisibleLayers(): string[]

Returns the server layer ids that are requested.

Returns

string[]

layers


hasEventListener

hasEventListener(type, callback?): boolean

Check if a list of event listeners for this type contains this listener

Parameters

Name Type Description
typestringtype of event or property
Optional callbackFunctionto be called, if null, check if any callback is registered

Returns

boolean

Inherited from

Vector.hasEventListener


initLoader

Protected initLoader(loader?): ArcGISFeature

Initializes the loader provided

Parameters

Name Type Description
Optional loaderAbstractLoaderloader to use

Returns

ArcGISFeature

this

Inherited from

Vector.initLoader


isDataLoaded

isDataLoaded(): boolean

Returns true if server data is already loaded (or no loader provided)

Returns

boolean

Inherited from

Vector.isDataLoaded


isDataReady

isDataReady(): boolean

Checks if source (current visible) data is loaded and ready to be rendered

Returns

boolean

Inherited from

Vector.isDataReady


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

Vector.isDisposed


isLoading

isLoading(): boolean

Checks if some of the requests haven't been finished yet. Returns true if some data is loading, false otherwise.

Returns

boolean

Inherited from

Vector.isLoading


isMultilayerSource

isMultilayerSource(): boolean

Returns true if feature source's server contains multiple layers Should be used asynchronically after loadServerData() method is called

Returns

boolean


isSilent

isSilent(): boolean

Return true if the event dispatcher doesn't notify any events

Returns

boolean

Inherited from

Vector.isSilent


loadServerData

loadServerData(): Promise<ArcGISFeature>

Returns promise that is loaded when server settings are ready to process

Returns

Promise<ArcGISFeature>

Inherited from

Vector.loadServerData


loadSourceData

loadSourceData(): Promise<AbstractSource>

Returns promise that is resolving when data are ready to process

Returns

Promise<AbstractSource>

Inherited from

Vector.loadSourceData


notify

notify<E>(type, source, args?): ArcGISFeature

Notify listeners

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEevent types
sourceVectorof the event
Optional argsEventMap[E]arguments of the event

Returns

ArcGISFeature

this

Inherited from

Vector.notify


off

off<E>(type?, callback?): ArcGISFeature

Detach listener on event. Calling .off() with no arguments removes all attached listeners. Calling .off(type) with no callback removes all attached listeners for specific type.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
Optional typeEtype of the event
Optional callback(eventType: E, sender: ArcGISFeature, args: EventMap[E]) => voidfunction to be called

Returns

ArcGISFeature

this

Inherited from

Vector.off


on

on<E>(type, callback): ArcGISFeature

Attach listener on event that will be called whenever the specified event is delivered to the target

If the callback function is already in the list of event listeners for this target, the function is not added a second time.

If a particular anonymous function is in the list of event listeners registered for a certain target, and then later in the code, an identical anonymous function is given in an "on" call, the second function will also be added to the list of event listeners for that target.

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event or property
callback(eventType: E, sender: ArcGISFeature, args: EventMap[E]) => voidto be called

Returns

ArcGISFeature

this

Inherited from

Vector.on


queryFeatures

queryFeatures(bbox, layer): ArcGISFeature

Sends a request for features in given bounding box.

Parameters

Name Type Description
bboxRectbounding box for features
layerAbstractFeatureLayerlayer requesting

Returns

ArcGISFeature

this

Inherited from

Vector.queryFeatures


queryLegend

queryLegend(callback): void

Creates a server legend from its templates (short info about each layer, such as layer name, type and icon)

Parameters

Name Type Description
callback(err: Error, data?: Legend | Legend[]) => voidthe result handler

Returns

void


removeFeature

removeFeature(feature): ArcGISFeature

Notifies source to remove feature.

Parameters

Name Type Description
featureAbstractFeaturefeature to remove

Returns

ArcGISFeature

this

Inherited from

Vector.removeFeature


requestData

requestData(resource): void

Requests data from the resource and parses the response

Parameters

Name Type Description
resourcestringresource url for request

Returns

void

Inherited from

Vector.requestData


resetLastQueryParams

Protected resetLastQueryParams(): ArcGISFeature

Resets saved last queried limits and layer

Returns

ArcGISFeature

this

Inherited from

Vector.resetLastQueryParams


setDataReady

Protected setDataReady(isReady, err?): ArcGISFeature

Sets source (current visible) data ready/not ready, changes the corresponding promise

Parameters

Name Type Description
isReadybooleantrue if source data was loaded, false if it needs to be reset
Optional errErrordata loading error (if exists)

Returns

ArcGISFeature

this

Inherited from

Vector.setDataReady


setGeometryPrecision

setGeometryPrecision(precision): ArcGISFeature

Sets the list of the fields to request from the server (should be set before the server url)

Parameters

Name Type Description
precisionnumbernumber of decimal places in requested geometry values

Returns

ArcGISFeature

this


setInitialCoordinateSystem

setInitialCoordinateSystem(system): ArcGISFeature

Sets the data initial coordinate system.

Parameters

Name Type Description
systemstring | AbstractSysteminitial coordinate system

Returns

ArcGISFeature

this

Inherited from

Vector.setInitialCoordinateSystem


setMapCoordinateSystem

setMapCoordinateSystem(system): ArcGISFeature

Sets map coordinate system.

Parameters

Name Type Description
systemstring | AbstractSystemmap coordinate system

Returns

ArcGISFeature

this

Inherited from

Vector.setMapCoordinateSystem


setProperties

setProperties(properties?): ArcGISFeature

Sets properties

Parameters

Name Type Description
Optional propertiesOptionsproperties

Returns

ArcGISFeature

this

Inherited from

Vector.setProperties


setQueryParameter

setQueryParameter(param, value?): ArcGISFeature

Sets custom query parameter to add to the data requests

Parameters

Name Type Description
paramstring | Record<string, string | number>parameter name or custom parameters object (in name -> value format)
Optional valuestring | numberparameter value

Returns

ArcGISFeature

this

Inherited from

Vector.setQueryParameter


setRequestFields

setRequestFields(requestFields): ArcGISFeature

Sets the list of the fields to request from the server (should be set before the server url)

Parameters

Name Type Description
requestFieldsstring[] | "*"an array of fields to request from server

Returns

ArcGISFeature

this


setRequestResolution

setRequestResolution(resolution): ArcGISFeature

Sets the grid size for layer partitioning that is used for server requests

Parameters

Name Type Description
resolutionnumbergrid size

Returns

ArcGISFeature

this

Inherited from

Vector.setRequestResolution


setServerURL

setServerURL(url): ArcGISFeature

Sets the server url to use for requesting

Parameters

Name Type Description
urlstring | string[]server url

Returns

ArcGISFeature

this

Inherited from

Vector.setServerURL


setSilent

setSilent(bool): ArcGISFeature

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

ArcGISFeature

this

Inherited from

Vector.setSilent


setToken

setToken(token): ArcGISFeature

Sets the authorization token for ArcGIS data server (if needed, null otherwise)

Parameters

Name Type Description
tokenstringthe authorization token for ArcGIS server

Returns

ArcGISFeature

this


setUniqueField

setUniqueField(field): ArcGISFeature

Sets the unique identifier for the features

Parameters

Name Type Description
fieldstringunique identifier

Returns

ArcGISFeature

this

Inherited from

Vector.setUniqueField


showLayers

showLayers(id): ArcGISFeature

Adds the passed in ID's to the list of layers to show

Parameters

Name Type Description
idstring | number | (string | number)[]id(s) for the layer(s) to show

Returns

ArcGISFeature


update

update(): ArcGISFeature

Aborts all the sent requests, resends the last one

Returns

ArcGISFeature

this

Inherited from

Vector.update


getClassName

Static getClassName(): string

Returns

string

Inherited from

Vector.getClassName