API / geotoolkit / map / sources / ArcGISImage / ArcGISImage
sources.ArcGISImage.ArcGISImage
Image source for ArcGIS servers that supports additional features provided by ArcGIS servers (such as getting legend). Supports ArcGIS version 9.3 and higher.
↳
ArcGISImage
Constructors
Methods
Css Properties
| Name | Type | Description |
|---|---|---|
system | string | Initial data coordinate system |
url | string | Data server url |
Constructors
• new ArcGISImage(options?)
| Name | Type | Description |
|---|---|---|
Optional options | Options | options |
Image.constructor
Methods
▸ abortGeometryQueries(): ArcGISImage
Aborts all the geometry data queried
this
▸ clear(): ArcGISImage
Notifies source to remove all data added.
this
▸ dispose(): void
Disposes this source, once disposed it should not be used anymore.
void
▸ getClassName(): string
string
▸ getCopyright(): string
Returns copyright information.
string
▸ Protected getDataLoader(): AbstractLoader
Returns server data loader (if exists)
▸ getInflateRatio(): number
Returns current inflate ratio
number
▸ getInitialCoordinateSystem(): AbstractSystem
Gets current data initial coordinate system.
Image.getInitialCoordinateSystem
▸ getInitialModelLimits(): Rect
Returns layer initial extent rectangle. Is supported in ArcGIS version 9.3 and higher.
▸ getLayers(): LayerServerData[]
Returns layers JSON data loaded from the server 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
▸ 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
▸ getSourceTimeout(): number
Returns timeout
number
▸ 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
▸ getVisibleLayers(): (string | number)[]
Returns the server layer ids that are requested.
(string | number)[]
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
▸ hideLayers(id?): ArcGISImage
Adds the passed in ID's to the list of layers to hide
| Name | Type | Description |
|---|---|---|
Optional id | string | number | (string | number)[] | ID(s) for the layers to show |
this
▸ identify(geometry, layer): AbstractFeature[]
Queries data by the geometry provided. Is supported in ArcGIS version 9.3 and higher.
| Name | Type | Description |
|---|---|---|
geometry | Point | Rect | Polygon | area geometry to identify |
layer | ArcGISImage | layer for query |
▸ Protected initLoader(loader?): ArcGISImage
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
▸ isSilent(): boolean
Return true if the event dispatcher doesn't notify any events
boolean
▸ loadServerData(): Promise<ArcGISImage>
Returns promise that is loaded when server settings are ready to process
Promise<ArcGISImage>
▸ loadSourceData(): Promise<AbstractSource>
Returns promise that is resolving when data are ready to process
Promise<AbstractSource>
▸ notify<E>(type, source, args?): ArcGISImage
Notify listeners
| Name | Type |
|---|---|
E | extends string |
| Name | Type | Description |
|---|---|---|
type | E | event types |
source | Image | of the event |
Optional args | EventMap[E] | arguments of the event |
this
▸ off<E>(type?, callback?): ArcGISImage
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: ArcGISImage, args: EventMap[E]) => void | function to be called |
this
▸ on<E>(type, callback): ArcGISImage
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: ArcGISImage, args: EventMap[E]) => void | to be called |
this
▸ queryGeometry(geometry): AbstractFeature[]
Queries data by the geometry provided. Is supported in ArcGIS version 9.3 and higher.
▸ queryLegend(callback): void
Queries server legend (short info about each layer, such as layer name, type and icon). WARNING! Only ArcGIS version 10.0 and higher supports this operation.
| Name | Type | Description |
|---|---|---|
callback | (err: Error, data?: Legend[]) => void | the result handler |
void
▸ Protected resetLastQueryParams(): ArcGISImage
Resets saved last queried limits and layer
this
▸ setDPI(dpi): ArcGISImage
Sets device resolution of the exported image (dots per inch)
| Name | Type | Description |
|---|---|---|
dpi | number | image resolution (dots per inch) |
this
▸ Protected setDataReady(isReady, err?): ArcGISImage
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
▸ setDynamicLayers(layers): ArcGISImage
Sets parameter to modify the layer drawing order, change layer drawing info, and change layer data source version for this server (if supported). See https://developers.arcgis.com/rest/services-reference/export-map.htm for more info
| Name | Type | Description |
|---|---|---|
layers | string | number | (string | number)[] | modified layers' drawing information |
this
▸ setInflateRatio(ratio): ArcGISImage
Sets image inflate ratio to use
| Name | Type | Description |
|---|---|---|
ratio | number | image inflate ratio (e.g. 0.2 means the 20% inflation) |
this
▸ setInitialCoordinateSystem(system): ArcGISImage
Sets the data initial coordinate system.
| Name | Type | Description |
|---|---|---|
system | string | AbstractSystem | initial coordinate system |
this
Image.setInitialCoordinateSystem
▸ setMapCoordinateSystem(system): ArcGISImage
Sets map coordinate system.
| Name | Type | Description |
|---|---|---|
system | string | AbstractSystem | map coordinate system |
this
▸ setProperties(properties?): ArcGISImage
Sets properties
| Name | Type | Description |
|---|---|---|
Optional properties | Options | properties |
this
▸ setQueryParameter(param, value?): ArcGISImage
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
▸ setServerURL(url): ArcGISImage
Sets the server url to use for requesting
| Name | Type | Description |
|---|---|---|
url | string | string[] | server url |
this
▸ setSilent(bool): ArcGISImage
Set silent mode
| Name | Type | Description |
|---|---|---|
bool | boolean | flag to enable silent mode |
this
▸ setSourceTimeout(timeout): ArcGISImage
Sets timeout
| Name | Type | Description |
|---|---|---|
timeout | number | timeout |
this
▸ setTime(time): ArcGISImage
Sets time instant or time extent of the exported map image
| Name | Type | Description |
|---|---|---|
time | number | Range | time instant or time extent of the exported map image |
this
▸ setToken(token): ArcGISImage
Sets the authorization token for ArcGIS data server (if needed, null otherwise)
| Name | Type | Description |
|---|---|---|
token | string | the authorization token for ArcGIS server |
this
▸ setTooltipLayers(layers): ArcGISImage
Sets layers to show as the tooltip info (in .queryGeometry and .identify methods)
| Name | Type | Description |
|---|---|---|
layers | number | number[] | layers to show tooltip |
this
▸ setTransparent(transparent): ArcGISImage
Sets exported image (layer) transparency
| Name | Type | Description |
|---|---|---|
transparent | boolean | exported image transparency |
this
▸ showLayers(layers): ArcGISImage
Sets the server layer name(s) to be shown on the layer
| Name | Type | Description |
|---|---|---|
layers | string | number | (string | number)[] | layer id(s) to be shown |
this
▸ update(): ArcGISImage
Aborts all the sent requests, resends the last one
this
▸ Static getClassName(): string
string