Last updated

API / geotoolkit / map / sources / WMSTile / WMSTile

Class: WMSTile

sources.WMSTile.WMSTile

Tile source that allows user to get map data as a bunch of tiles using the WMS (Web Map Service) server

Hierarchy

Table of contents

Constructors
Methods
Css Properties
Name Type Description
imagepoolnumberThe amount of cache for the tile images
maxlodnumberThe maximum level of details for the tiles
minlodnumberThe minimum level of details for the tiles
systemstringInitial data coordinate system
tileheightnumberHeight for the tiles to use (in px)
tilewidthnumberWidth for the tiles to use (in px)
tokenstringAuthorization token (for ArcGIS tile servers if needed)
urlstringData server url

Contents

Constructors

new WMSTile(options)

new WMSTile(options?)

Parameters

Name Type Description
Optional optionsOptionsoptions

Overrides

Tile.constructor

Methods

clear

clear(): WMSTile

Clears all the data.

Returns

WMSTile

this

Inherited from

Tile.clear


dispose

dispose(): void

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

Returns

void

Inherited from

Tile.dispose


getClassName

getClassName(): string

Returns

string

Inherited from

Tile.getClassName


getCopyright

getCopyright(): string

Returns copyright information.

Returns

string

Inherited from

Tile.getCopyright


getDataLoader

Protected getDataLoader(): AbstractLoader

Returns server data loader (if exists)

Returns

AbstractLoader

Inherited from

Tile.getDataLoader


getImageFormat

getImageFormat(): string

Returns the image format currently used for tiles

Returns

string


getInitialCoordinateSystem

getInitialCoordinateSystem(): AbstractSystem

Gets current data initial coordinate system.

Returns

AbstractSystem

Inherited from

Tile.getInitialCoordinateSystem


getLayers

getLayers(): LayerServerData[]

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

Returns

LayerServerData[]


getMapCoordinateSystem

getMapCoordinateSystem(): AbstractSystem

Gets current map coordinate system.

Returns

AbstractSystem

Inherited from

Tile.getMapCoordinateSystem


getModelLimits

getModelLimits(): Rect

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

Returns

Rect

Inherited from

Tile.getModelLimits


getProperties

getProperties(): OptionsOut

Returns properties

Returns

OptionsOut

options

Inherited from

Tile.getProperties


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

Tile.getServerData


getServerURL

getServerURL(): string | string[]

Gets the server url that is currently used for requests

Returns

string | string[]

server url

Inherited from

Tile.getServerURL


getTransformerFromMap

getTransformerFromMap(): Transformer

Gets transformer to transform data from map coordinate system

Returns

Transformer

Inherited from

Tile.getTransformerFromMap


getTransformerToMap

getTransformerToMap(): Transformer

Gets transformer to transform data to map coordinate system

Returns

Transformer

Inherited from

Tile.getTransformerToMap


getTransparent

getTransparent(): boolean

Returns the tiles current transparency

Returns

boolean


getVersion

getVersion(): string

Returns WMS version currently used

Returns

string


getVisibleLayers

getVisibleLayers(): (string | number)[]

Returns the server layer ids that are requested.

Returns

(string | number)[]

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

Tile.hasEventListener


hideLayers

hideLayers(id?): WMSTile

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

Parameters

Name Type Description
Optional idstring | number | (string | number)[]ID(s) for the layers to show

Returns

WMSTile

this


initLoader

Protected initLoader(loader?): WMSTile

Initializes the loader provided

Parameters

Name Type Description
Optional loaderAbstractLoaderloader to use

Returns

WMSTile

this

Inherited from

Tile.initLoader


isDataLoaded

isDataLoaded(): boolean

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

Returns

boolean

Inherited from

Tile.isDataLoaded


isDataReady

isDataReady(): boolean

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

Returns

boolean

Inherited from

Tile.isDataReady


isDisposed

isDisposed(): boolean

Returns whether this object has been disposed

Returns

boolean

Inherited from

Tile.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

Tile.isLoading


isSilent

isSilent(): boolean

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

Returns

boolean

Inherited from

Tile.isSilent


loadServerData

loadServerData(): Promise<WMSTile>

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

Returns

Promise<WMSTile>

Inherited from

Tile.loadServerData


loadSourceData

loadSourceData(): Promise<AbstractSource>

Returns promise that is resolving when data are ready to process

Returns

Promise<AbstractSource>

Inherited from

Tile.loadSourceData


notify

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

Notify listeners

Type parameters

NameType
Eextends string

Parameters

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

Returns

WMSTile

this

Inherited from

Tile.notify


off

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

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: WMSTile, args: EventMap[E]) => voidfunction to be called

Returns

WMSTile

this

Inherited from

Tile.off


on

on<E>(type, callback): WMSTile

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: WMSTile, args: EventMap[E]) => voidto be called

Returns

WMSTile

this

Inherited from

Tile.on


resetLastQueryParams

Protected resetLastQueryParams(): WMSTile

Resets saved last queried limits and layer

Returns

WMSTile

this

Inherited from

Tile.resetLastQueryParams


setDataReady

Protected setDataReady(isReady, err?): WMSTile

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

WMSTile

this

Inherited from

Tile.setDataReady


setImageFormat

setImageFormat(format): WMSTile

Sets the image format to be used for tiles

Parameters

Name Type Description
formatstringimage format to use (e.g. 'png')

Returns

WMSTile

this


setInitialCoordinateSystem

setInitialCoordinateSystem(system): WMSTile

Sets the data initial coordinate system.

Parameters

Name Type Description
systemstring | AbstractSysteminitial coordinate system

Returns

WMSTile

this

Inherited from

Tile.setInitialCoordinateSystem


setMapCoordinateSystem

setMapCoordinateSystem(system): WMSTile

Sets map coordinate system.

Parameters

Name Type Description
systemstring | AbstractSystemmap coordinate system

Returns

WMSTile

this

Inherited from

Tile.setMapCoordinateSystem


setProperties

setProperties(properties?): WMSTile

Sets properties (default properties listed are for construction time only)

Parameters

Name Type Description
Optional propertiesOptionsoptions

Returns

WMSTile

this

Inherited from

Tile.setProperties


setQueryParameter

setQueryParameter(param, value?): WMSTile

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

WMSTile

this

Inherited from

Tile.setQueryParameter


setServerURL

setServerURL(url): WMSTile

Sets the server url to use for requesting

Parameters

Name Type Description
urlstring | string[]server url

Returns

WMSTile

this

Inherited from

Tile.setServerURL


setSilent

setSilent(bool): WMSTile

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

WMSTile

this

Inherited from

Tile.setSilent


setTransparent

setTransparent(transparent): WMSTile

Sets the tiles transparency

Parameters

Name Type Description
transparentbooleantiles transparency

Returns

WMSTile

this


setVersion

setVersion(version): WMSTile

Sets WMS version to use

Parameters

Name Type Description
versionstringversion to use (in '1.3.0' format)

Returns

WMSTile

this


showLayers

showLayers(layers): WMSTile

Sets the server layer name(s) to be shown on the layer

Parameters

Name Type Description
layersstring | number | (string | number)[]layer id(s) to be shown

Returns

WMSTile

this


update

update(): WMSTile

Aborts all the sent requests, resends the last one

Returns

WMSTile

this

Inherited from

Tile.update


getClassName

Static getClassName(): string

Returns

string

Inherited from

Tile.getClassName