API / geotoolkit / map / sources / loaders / AbstractLoader / AbstractLoader
loaders.AbstractLoader.AbstractLoader
Abstract source loader that loads server settings by sending appropriate query and parsing its response The settings request could be flexibly adjusted the by additional parameters specified in 'options'. All of them will be added as a query parameter.
Example
import {ArcGISFeature} from '@int/geotoolkit/map/sources/loaders/ArcGISFeature';
const loader = new ArcGISFeature({
// all undocumented parameters would be directly added to the request:
'token': 'TikYtCP33k_Ql2mt_233AJZm3iHkFbowqWSUe9ZmkRp15PBbZLgYTEUP0sc46Nxjt5DPWBfSZst5b9ykD7x9mQ..'
});Constructors
Methods
Constructors
• Protected new AbstractLoader(options?)
Creates loader
| Name | Type | Description |
|---|---|---|
Optional options | Options | options |
Methods
▸ clone(): AbstractLoader
All subclasses should override copyConstructor or provide custom implementation for this method
clone
▸ cloneQueryParameters(loader): AbstractLoader
Copies query parameters from another loader
| Name | Type | Description |
|---|---|---|
loader | AbstractLoader | loader to clone parameters |
this
▸ Protected copyConstructor(src, deepCopy?): AbstractLoader
Copy constructor function.
Function used as part of the cloning mechanism.
Implementations should copy the given instance state to this instance.
| Name | Type | Description |
|---|---|---|
src | AbstractLoader | Source to copy from |
Optional deepCopy | boolean | deep copy |
this
▸ getClassName(): string
string
▸ getConnector(): AbstractConnector<any>
Returns connector
AbstractConnector<any>
▸ getCopyright(): string
Returns copyright information.
string
▸ Protected getRequestOptions(): SendOptions
Returns server settings request options
▸ Abstract getSettingsUrl(): string
Returns server settings request url
string
request server data request
▸ Protected loaded(callback): void
Resolves loading promise asynchronically
| Name | Type | Description |
|---|---|---|
callback | (loader: AbstractLoader) => void | resolving callback |
void
▸ Abstract parse(data, onload): void
Parses server data response
| Name | Type | Description |
|---|---|---|
data | string | JSONObject | XMLDocument | data received from the server |
onload | (loader: AbstractLoader) => void | function to be called when data is loaded |
void
▸ setQueryParameter(param, value): AbstractLoader
Sets the query parameter to add to the server settings request
| Name | Type | Description |
|---|---|---|
param | string | parameter name |
value | string | number | boolean | parameter value |
this
▸ Static getClassName(): string
string