Skip to content
Last updated

API / geotoolkit / map / sources / formats / VectorTile / VectorTile

Class: VectorTile

formats.VectorTile.VectorTile

VectorTile source format that formats tile queries to Mapbox server and parses Pbf (Protocolbuffer Binary Format) formatted response

Hierarchy

Table of contents

Constructors
  • [new VectorTile(options)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.map.sources.formats.vectortile.vectortile.md#new vectortile(options))
Methods

Contents

Constructors

new VectorTile(options)

• new VectorTile(options?)

Creates format

Parameters

Name Type Description
Optional optionsOptionsoptions

Overrides

Tile.constructor

Methods

abort

▸ abort(key?): VectorTile

Aborts all previous requests

Parameters

Name Type Description
Optional keystringkey of the connections to abort (all connections aborted if nothing provided)

Returns

VectorTile

this

Inherited from

Tile.abort


clone

▸ clone(): AbstractFormat

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

Returns

AbstractFormat

clone

Inherited from

Tile.clone


cloneQueryParameters

▸ cloneQueryParameters(format): VectorTile

Copies query parameters from another format

Parameters

Name Type Description
formatAbstractFormatformat to clone parameters

Returns

VectorTile

this

Inherited from

Tile.cloneQueryParameters


copyConstructor

▸ Protected copyConstructor(src, deepCopy?): VectorTile

Copy constructor function.<br> Function used as part of the cloning mechanism.<br> Implementations should copy the given instance state to this instance.<br>

Parameters

Name Type Description
srcAbstractFormatSource to copy from
Optional deepCopybooleandeep copy

Returns

VectorTile

this

Inherited from

Tile.copyConstructor


dispose

▸ dispose(): void

Dispose.

Returns

void

Inherited from

Tile.dispose


getClassName

▸ getClassName(): string

Returns

string

Inherited from

Tile.getClassName


getConnector

▸ getConnector(): AbstractConnector<any&gt;

Gets connector

Returns

AbstractConnector<any&gt;

connector

Inherited from

Tile.getConnector


getFormatter

▸ getFormatter(): FormatterCallback

Gets the current formatter function

Returns

FormatterCallback

Inherited from

Tile.getFormatter


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


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


isValidUrl

▸ isValidUrl(): boolean

Check if URL is configured to load layer data

Returns

boolean

Inherited from

Tile.isValidUrl


notify

▸ notify<E&gt;(type, source, args?): VectorTile

Notify listeners

Type parameters

NameType
Eextends string

Parameters

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

Returns

VectorTile

this

Inherited from

Tile.notify


off

▸ off<E&gt;(type?, callback?): VectorTile

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

Returns

VectorTile

this

Inherited from

Tile.off


on

▸ on<E&gt;(type, callback): VectorTile

Attach listener on event that will be called whenever the specified event is delivered to the target <p> If the callback function is already in the list of event listeners for this target, the function is not added a second time. </p> <p> 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. </p>

Type parameters

NameType
Eextends string

Parameters

Name Type Description
typeEtype of event or property
callback(eventType: E, sender: VectorTile, args: EventMap[E]) => voidto be called

Returns

VectorTile

this

Inherited from

Tile.on


parse

▸ parse(data): VectorTile

Parses the data provided and notifies about the result. Is used in the default query implementation.

Parameters

Name Type Description
dataanydata object or its string representation

Returns

VectorTile

this

Inherited from

Tile.parse


query

▸ query(query): VectorTile

Sends a request based on a settings provided That's a basic implementation for the file requests. Implement parse method to use it or override this method directly.

Parameters

Name Type Description
queryFormatQueryquery params

Returns

VectorTile

this

Overrides

Tile.query


setFormatter

▸ setFormatter(formatter): VectorTile

Sets the formatter function

Parameters

Name Type Description
formatterFormatterCallbackformatter function

Returns

VectorTile

this

Inherited from

Tile.setFormatter


setQueryParameter

▸ setQueryParameter(param, value): VectorTile

Sets the query parameter to add to the data requests

Parameters

Name Type Description
paramstringparameter name
valuestring | number | booleanparameter value

Returns

VectorTile

this

Inherited from

Tile.setQueryParameter


setSilent

▸ setSilent(bool): VectorTile

Set silent mode

Parameters

Name Type Description
boolbooleanflag to enable silent mode

Returns

VectorTile

this

Inherited from

Tile.setSilent


getClassName

▸ Static getClassName(): string

Returns

string

Inherited from

Tile.getClassName