Last updated

API / geotoolkit / map / sources / loaders / AbstractLoader / AbstractLoader

Class: 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..'
});

Hierarchy

Table of contents

Constructors
Methods

Contents

Constructors

new AbstractLoader(options)

Protected new AbstractLoader(options?)

Creates loader

Parameters

Name Type Description
Optional optionsOptionsoptions
Methods

clone

clone(): AbstractLoader

All subclasses should override copyConstructor or provide custom implementation for this method

Returns

AbstractLoader

clone


cloneQueryParameters

cloneQueryParameters(loader): AbstractLoader

Copies query parameters from another loader

Parameters

Name Type Description
loaderAbstractLoaderloader to clone parameters

Returns

AbstractLoader

this


copyConstructor

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.

Parameters

Name Type Description
srcAbstractLoaderSource to copy from
Optional deepCopybooleandeep copy

Returns

AbstractLoader

this


getClassName

getClassName(): string

Returns

string


getConnector

getConnector(): AbstractConnector<any>

Returns connector

Returns

AbstractConnector<any>


getCopyright

getCopyright(): string

Returns copyright information.

Returns

string


getRequestOptions

Protected getRequestOptions(): SendOptions

Returns server settings request options

Returns

SendOptions


getSettingsUrl

Abstract getSettingsUrl(): string

Returns server settings request url

Returns

string

request server data request


loaded

Protected loaded(callback): void

Resolves loading promise asynchronically

Parameters

Name Type Description
callback(loader: AbstractLoader) => voidresolving callback

Returns

void


parse

Abstract parse(data, onload): void

Parses server data response

Parameters

Name Type Description
datastring | JSONObject | XMLDocumentdata received from the server
onload(loader: AbstractLoader) => voidfunction to be called when data is loaded

Returns

void


setQueryParameter

setQueryParameter(param, value): AbstractLoader

Sets the query parameter to add to the server settings request

Parameters

Name Type Description
paramstringparameter name
valuestring | number | booleanparameter value

Returns

AbstractLoader

this


getClassName

Static getClassName(): string

Returns

string