API / geotoolkit / map / sources / ArcGISFeature / ArcGISFeature
sources.ArcGISFeature.ArcGISFeature
Vector source that allows user to get features from ArcGIS FeatureService server. Supports ArcGIS version 10.0 and higher.
↳
ArcGISFeature
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
system | string | Initial data coordinate system |
url | string | Data server url |
Constructors
• new ArcGISFeature(options?)
| Name | Type | Description |
|---|---|---|
Optional options | Options | options |
Vector.constructor
Methods
▸ addFeatures(features, needTransform?): ArcGISFeature
Notifies source to add features.
| Name | Type | Description |
|---|---|---|
features | AbstractFeature[] | features to add |
Optional needTransform | boolean | true if features should be transformed to the map coordinates |
this
▸ clear(): ArcGISFeature
Clears all the data.
this
▸ clearFeatures(): ArcGISFeature
Notifies source to remove all features added.
this
▸ dispose(): void
Disposes this source, once disposed it should not be used anymore.
void
▸ getAnnotationShape(): Text
Returns annotation's text shape parsed from the server (for singlelayer servers basically) Should be used asynchronically after loadServerData() method is called
▸ getClassName(): string
string
▸ getCopyright(): string
Returns copyright information.
string
▸ Protected getDataLoader(): AbstractLoader
Returns server data loader (if exists)
▸ getGeometryPrecision(): number
Returns number of decimal places in requested geometry values
number
▸ getGlobalAlpha(): number
Returns the server layer's global alpha (for singlelayer servers basically) Should be used asynchronically after loadServerData() method is called
number
▸ getInitialCoordinateSystem(): AbstractSystem
Gets current data initial coordinate system.
Vector.getInitialCoordinateSystem
▸ getInitialModelLimits(): Rect
Returns layer initial extent rectangle
▸ 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
| Name | Type | Description |
|---|---|---|
id | string | required layer id |
source feature source for sublayer
▸ getLayers(): LayerServerData[]
Returns the layers data array (for the multilayer server source) Should be used asynchronically after loadServerData() method is called
▸ getMapCoordinateSystem(): AbstractSystem
Gets current map coordinate system.
▸ getModelLimits(): Rect
Returns the current data model limits (presumably loaded from the server if it's settled)
▸ getProperties(): OptionsOut
Returns properties
properties
▸ getRequestFields(): string[] | "*"
Returns an array of fields to be requested from server
string[] | "*"
▸ getRequestResolution(): number
Gets the grid size for layer partitioning that is used for server requests
number
▸ getScaleRange(): number[]
Returns scale visible range for the server's layer (for singlelayer servers basically) Should be used asynchronically after loadServerData() method is called
number[]
[minScale, maxScale]
▸ getServerData(): JSONObject | XMLDocument
Returns server data loaded from the server Should be used asynchronically after loadServerData() method is called
JSONObject | XMLDocument
▸ getServerURL(): string | string[]
Gets the server url that is currently used for requests
string | string[]
server url
▸ getToken(): string
Returns the authorization token (if set, null otherwise)
string
▸ getTransformerFromMap(): Transformer
Gets transformer to transform data from map coordinate system
▸ getTransformerToMap(): Transformer
Gets transformer to transform data to map coordinate system
▸ getUniqueField(): string
Gets the unique identifier for the dataset
string
field
▸ getVisibleLayers(): string[]
Returns the server layer ids that are requested.
string[]
layers
▸ hasEventListener(type, callback?): boolean
Check if a list of event listeners for this type contains this listener
| Name | Type | Description |
|---|---|---|
type | string | type of event or property |
Optional callback | Function | to be called, if null, check if any callback is registered |
boolean
▸ Protected initLoader(loader?): ArcGISFeature
Initializes the loader provided
| Name | Type | Description |
|---|---|---|
Optional loader | AbstractLoader | loader to use |
this
▸ isDataLoaded(): boolean
Returns true if server data is already loaded (or no loader provided)
boolean
▸ isDataReady(): boolean
Checks if source (current visible) data is loaded and ready to be rendered
boolean
▸ isDisposed(): boolean
Returns whether this object has been disposed
boolean
▸ isLoading(): boolean
Checks if some of the requests haven't been finished yet. Returns true if some data is loading, false otherwise.
boolean
▸ isMultilayerSource(): boolean
Returns true if feature source's server contains multiple layers Should be used asynchronically after loadServerData() method is called
boolean
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ loadServerData(): Promise<ArcGISFeature>
Returns promise that is loaded when server settings are ready to process
Promise<ArcGISFeature>
▸ loadSourceData(): Promise<AbstractSource>
Returns promise that is resolving when data are ready to process
Promise<AbstractSource>
▸ notify<E>(type, source, args?): ArcGISFeature
Notify listeners
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | event types |
source | Vector | of the event |
Optional args | EventMap[E] | arguments of the event |
this
▸ 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.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
Optional type | E | type of the event |
Optional callback | (eventType: E, sender: ArcGISFeature, args: EventMap[E]) => void | function to be called |
this
▸ 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.
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | type of event or property |
callback | (eventType: E, sender: ArcGISFeature, args: EventMap[E]) => void | to be called |
this
▸ queryFeatures(bbox, layer): ArcGISFeature
Sends a request for features in given bounding box.
| Name | Type | Description |
|---|---|---|
bbox | Rect | bounding box for features |
layer | AbstractFeatureLayer | layer requesting |
this
▸ queryLegend(callback): void
Creates a server legend from its templates (short info about each layer, such as layer name, type and icon)
void
▸ removeFeature(feature): ArcGISFeature
Notifies source to remove feature.
| Name | Type | Description |
|---|---|---|
feature | AbstractFeature | feature to remove |
this
▸ requestData(resource): void
Requests data from the resource and parses the response
| Name | Type | Description |
|---|---|---|
resource | string | resource url for request |
void
▸ Protected resetLastQueryParams(): ArcGISFeature
Resets saved last queried limits and layer
this
▸ Protected setDataReady(isReady, err?): ArcGISFeature
Sets source (current visible) data ready/not ready, changes the corresponding promise
| Name | Type | Description |
|---|---|---|
isReady | boolean | true if source data was loaded, false if it needs to be reset |
Optional err | Error | data loading error (if exists) |
this
▸ setGeometryPrecision(precision): ArcGISFeature
Sets the list of the fields to request from the server (should be set before the server url)
| Name | Type | Description |
|---|---|---|
precision | number | number of decimal places in requested geometry values |
this
▸ setInitialCoordinateSystem(system): ArcGISFeature
Sets the data initial coordinate system.
| Name | Type | Description |
|---|---|---|
system | string | AbstractSystem | initial coordinate system |
this
Vector.setInitialCoordinateSystem
▸ setMapCoordinateSystem(system): ArcGISFeature
Sets map coordinate system.
| Name | Type | Description |
|---|---|---|
system | string | AbstractSystem | map coordinate system |
this
▸ setProperties(properties?): ArcGISFeature
Sets properties
| Name | Type | Description |
|---|---|---|
Optional properties | Options | properties |
this
▸ setQueryParameter(param, value?): ArcGISFeature
Sets custom query parameter to add to the data requests
| Name | Type | Description |
|---|---|---|
param | string | Record<string, string | number> | parameter name or custom parameters object (in name -> value format) |
Optional value | string | number | parameter value |
this
▸ setRequestFields(requestFields): ArcGISFeature
Sets the list of the fields to request from the server (should be set before the server url)
| Name | Type | Description |
|---|---|---|
requestFields | string[] | "*" | an array of fields to request from server |
this
▸ setRequestResolution(resolution): ArcGISFeature
Sets the grid size for layer partitioning that is used for server requests
| Name | Type | Description |
|---|---|---|
resolution | number | grid size |
this
▸ setServerURL(url): ArcGISFeature
Sets the server url to use for requesting
| Name | Type | Description |
|---|---|---|
url | string | string[] | server url |
this
▸ setSilent(bool): ArcGISFeature
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setToken(token): ArcGISFeature
Sets the authorization token for ArcGIS data server (if needed, null otherwise)
| Name | Type | Description |
|---|---|---|
token | string | the authorization token for ArcGIS server |
this
▸ setUniqueField(field): ArcGISFeature
Sets the unique identifier for the features
| Name | Type | Description |
|---|---|---|
field | string | unique identifier |
this
▸ showLayers(id): ArcGISFeature
Adds the passed in ID's to the list of layers to show
| Name | Type | Description |
|---|---|---|
id | string | number | (string | number)[] | id(s) for the layer(s) to show |
▸ update(): ArcGISFeature
Aborts all the sent requests, resends the last one
this
▸ Static getClassName(): string
string