[API](/solutions/geotoolkit/geotoolkit_js/apis/readme) / [geotoolkit](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit) / [map](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map) / [sources](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map#sources) / [GPX](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map#gpx) / GPX

# Class: GPX

[sources](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map#sources).[GPX](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map#gpx).GPX

Vector source that allows user to get features from remote resource in GPX (Global Positioning System Exchange) format

## Hierarchy

- [`Vector`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector)
↳ **`GPX`**


## Table of contents

Constructors
- [new GPX(options)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.map.sources.gpx.gpx.md#new gpx(options))


Methods
| [addFeatures](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#addfeatures) | [clear](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#clear) | [clearFeatures](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#clearfeatures) |
|  --- | --- | --- |
| [dispose](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#dispose) | [getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#getclassname) | [getCopyright](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#getcopyright) |
| [getDataLoader](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#getdataloader) | [getInitialCoordinateSystem](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#getinitialcoordinatesystem) | [getMapCoordinateSystem](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#getmapcoordinatesystem) |
| [getModelLimits](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#getmodellimits) | [getProperties](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#getproperties) | [getRequestResolution](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#getrequestresolution) |
| [getServerData](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#getserverdata) | [getServerURL](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#getserverurl) | [getTransformerFromMap](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#gettransformerfrommap) |
| [getTransformerToMap](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#gettransformertomap) | [getUniqueField](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#getuniquefield) | [hasEventListener](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#haseventlistener) |
| [initLoader](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#initloader) | [isDataLoaded](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#isdataloaded) | [isDataReady](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#isdataready) |
| [isDisposed](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#isdisposed) | [isLoading](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#isloading) | [isSilent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#issilent) |
| [loadServerData](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#loadserverdata) | [loadSourceData](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#loadsourcedata) | [notify](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#notify) |
| [off](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#off) | [on](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#on) | [queryFeatures](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#queryfeatures) |
| [removeFeature](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#removefeature) | [requestData](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#requestdata) | [resetLastQueryParams](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#resetlastqueryparams) |
| [setDataReady](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#setdataready) | [setInitialCoordinateSystem](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#setinitialcoordinatesystem) | [setMapCoordinateSystem](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#setmapcoordinatesystem) |
| [setProperties](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#setproperties) | [setQueryParameter](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#setqueryparameter) | [setRequestResolution](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#setrequestresolution) |
| [setServerURL](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#setserverurl) | [setSilent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#setsilent) | [setUniqueField](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#setuniquefield) |
| [update](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#update) | [getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx#getclassname-1) |


Css Properties
| Name  | Type  | Description |
|  --- | --- | --- |
| `system` | `string` | Initial data coordinate system |
| `url` | `string` | Data server url |


## Contents

Constructors
#### new GPX(options)

• **new GPX**(`options?`)

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `Optional` `options` | [`Options`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map#vector#options-1) | options |


#### Overrides

Vector.constructor

Methods
#### addFeatures

▸ **addFeatures**(`features`, `needTransform?`): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

Notifies source to add features.

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `features` | [`AbstractFeature`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.features.abstractfeature.abstractfeature)[] | features to add |
| `Optional` `needTransform` | `boolean` | true if features should be transformed to the map coordinates |


#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[addFeatures](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#addfeatures)

#### clear

▸ **clear**(): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

Clears all the data.

#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[clear](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#clear)

#### clearFeatures

▸ **clearFeatures**(): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

Notifies source to remove all features added.

#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[clearFeatures](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#clearfeatures)

#### dispose

▸ **dispose**(): `void`

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

#### Returns

`void`

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[dispose](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#dispose)

#### getClassName

▸ **getClassName**(): `string`

#### Returns

`string`

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#getclassname)

#### getCopyright

▸ **getCopyright**(): `string`

Returns copyright information.

#### Returns

`string`

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[getCopyright](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#getcopyright)

#### getDataLoader

▸ `Protected` **getDataLoader**(): [`AbstractLoader`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.loaders.abstractloader.abstractloader)

Returns server data loader (if exists)

#### Returns

[`AbstractLoader`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.loaders.abstractloader.abstractloader)

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[getDataLoader](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#getdataloader)

#### getInitialCoordinateSystem

▸ **getInitialCoordinateSystem**(): [`AbstractSystem`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.coordinatesystems.abstractsystem.abstractsystem)

Gets current data initial coordinate system.

#### Returns

[`AbstractSystem`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.coordinatesystems.abstractsystem.abstractsystem)

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[getInitialCoordinateSystem](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#getinitialcoordinatesystem)

#### getMapCoordinateSystem

▸ **getMapCoordinateSystem**(): [`AbstractSystem`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.coordinatesystems.abstractsystem.abstractsystem)

Gets current map coordinate system.

#### Returns

[`AbstractSystem`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.coordinatesystems.abstractsystem.abstractsystem)

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[getMapCoordinateSystem](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#getmapcoordinatesystem)

#### getModelLimits

▸ **getModelLimits**(): [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

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

#### Returns

[`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect)

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[getModelLimits](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#getmodellimits)

#### getProperties

▸ **getProperties**(): [`OptionsOut`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map#abstractsource#optionsout)

Returns properties

#### Returns

[`OptionsOut`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map#abstractsource#optionsout)

properties

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[getProperties](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#getproperties)

#### getRequestResolution

▸ **getRequestResolution**(): `number`

Gets the grid size for layer partitioning that is used for server requests

#### Returns

`number`

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[getRequestResolution](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#getrequestresolution)

#### getServerData

▸ **getServerData**(): [`JSONObject`](/solutions/geotoolkit/geotoolkit_js/apis/interfaces/geotoolkit.map.sources.connectors.abstractconnector.abstractconnector.jsonobject) | `XMLDocument`

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

#### Returns

[`JSONObject`](/solutions/geotoolkit/geotoolkit_js/apis/interfaces/geotoolkit.map.sources.connectors.abstractconnector.abstractconnector.jsonobject) | `XMLDocument`

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[getServerData](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#getserverdata)

#### getServerURL

▸ **getServerURL**(): `string` | `string`[]

Gets the server url that is currently used for requests

#### Returns

`string` | `string`[]

server url

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[getServerURL](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#getserverurl)

#### getTransformerFromMap

▸ **getTransformerFromMap**(): [`Transformer`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.coordinatesystems.transformer.transformer)

Gets transformer to transform data from map coordinate system

#### Returns

[`Transformer`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.coordinatesystems.transformer.transformer)

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[getTransformerFromMap](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#gettransformerfrommap)

#### getTransformerToMap

▸ **getTransformerToMap**(): [`Transformer`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.coordinatesystems.transformer.transformer)

Gets transformer to transform data to map coordinate system

#### Returns

[`Transformer`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.coordinatesystems.transformer.transformer)

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[getTransformerToMap](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#gettransformertomap)

#### getUniqueField

▸ **getUniqueField**(): `string`

Gets the unique identifier for the dataset

#### Returns

`string`

field

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[getUniqueField](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#getuniquefield)

#### hasEventListener

▸ **hasEventListener**(`type`, `callback?`): `boolean`

Check if a list of event listeners for this type contains this listener

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `type` | `string` | type of event or property |
| `Optional` `callback` | `Function` | to be called, if null, check if any callback is registered |


#### Returns

`boolean`

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[hasEventListener](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#haseventlistener)

#### initLoader

▸ `Protected` **initLoader**(`loader?`): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

Initializes the loader provided

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `Optional` `loader` | [`AbstractLoader`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.loaders.abstractloader.abstractloader) | loader to use |


#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[initLoader](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#initloader)

#### isDataLoaded

▸ **isDataLoaded**(): `boolean`

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

#### Returns

`boolean`

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[isDataLoaded](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#isdataloaded)

#### isDataReady

▸ **isDataReady**(): `boolean`

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

#### Returns

`boolean`

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[isDataReady](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#isdataready)

#### isDisposed

▸ **isDisposed**(): `boolean`

Returns whether this object has been disposed

#### Returns

`boolean`

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[isDisposed](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#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

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[isLoading](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#isloading)

#### isSilent

▸ **isSilent**(): `boolean`

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

#### Returns

`boolean`

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[isSilent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#issilent)

#### loadServerData

▸ **loadServerData**(): `Promise`<[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)&gt;

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

#### Returns

`Promise`<[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)&gt;

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[loadServerData](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#loadserverdata)

#### loadSourceData

▸ **loadSourceData**(): `Promise`<[`AbstractSource`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.abstractsource.abstractsource)&gt;

Returns promise that is resolving when data are ready to process

#### Returns

`Promise`<[`AbstractSource`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.abstractsource.abstractsource)&gt;

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[loadSourceData](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#loadsourcedata)

#### notify

▸ **notify**<`E`&gt;(`type`, `source`, `args?`): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

Notify listeners

#### Type parameters

| Name | Type |
|  --- | --- |
| `E` | extends `string` |


#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `type` | `E` | event types |
| `source` | [`Vector`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector) | of the event |
| `Optional` `args` | [`EventMap`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map#vector#eventmap)[`E`] | arguments of the event |


#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[notify](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#notify)

#### off

▸ **off**<`E`&gt;(`type?`, `callback?`): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

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

| Name | Type |
|  --- | --- |
| `E` | extends `string` |


#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `Optional` `type` | `E` | type of the event |
| `Optional` `callback` | (`eventType`: `E`, `sender`: [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx), `args`: [`EventMap`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map#vector#eventmap)[`E`]) => `void` | function to be called |


#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[off](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#off)

#### on

▸ **on**<`E`&gt;(`type`, `callback`): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

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

| Name | Type |
|  --- | --- |
| `E` | extends `string` |


#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `type` | `E` | type of event or property |
| `callback` | (`eventType`: `E`, `sender`: [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx), `args`: [`EventMap`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map#vector#eventmap)[`E`]) => `void` | to be called |


#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[on](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#on)

#### queryFeatures

▸ **queryFeatures**(`bbox`, `layer`): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

Sends a request for features in given bounding box.

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `bbox` | [`Rect`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.util.rect.rect) | bounding box for features |
| `layer` | [`AbstractFeatureLayer`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.layers.abstractfeaturelayer.abstractfeaturelayer) | layer requesting |


#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[queryFeatures](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#queryfeatures)

#### removeFeature

▸ **removeFeature**(`feature`): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

Notifies source to remove feature.

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `feature` | [`AbstractFeature`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.features.abstractfeature.abstractfeature) | feature to remove |


#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[removeFeature](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#removefeature)

#### requestData

▸ **requestData**(`resource`): `void`

Requests data from the resource and parses the response

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `resource` | `string` | resource url for request |


#### Returns

`void`

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[requestData](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#requestdata)

#### resetLastQueryParams

▸ `Protected` **resetLastQueryParams**(): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

Resets saved last queried limits and layer

#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[resetLastQueryParams](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#resetlastqueryparams)

#### setDataReady

▸ `Protected` **setDataReady**(`isReady`, `err?`): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

Sets source (current visible) data ready/not ready, changes the corresponding promise

#### Parameters

| 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) |


#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[setDataReady](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#setdataready)

#### setInitialCoordinateSystem

▸ **setInitialCoordinateSystem**(`system`): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

Sets the data initial coordinate system.

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `system` | `string` | [`AbstractSystem`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.coordinatesystems.abstractsystem.abstractsystem) | initial coordinate system |


#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[setInitialCoordinateSystem](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#setinitialcoordinatesystem)

#### setMapCoordinateSystem

▸ **setMapCoordinateSystem**(`system`): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

Sets map coordinate system.

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `system` | `string` | [`AbstractSystem`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.coordinatesystems.abstractsystem.abstractsystem) | map coordinate system |


#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[setMapCoordinateSystem](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#setmapcoordinatesystem)

#### setProperties

▸ **setProperties**(`properties?`): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

Sets properties

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `Optional` `properties` | [`Options`](/solutions/geotoolkit/geotoolkit_js/apis/modules/geotoolkit.map#abstractsource#options) | properties |


#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[setProperties](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#setproperties)

#### setQueryParameter

▸ **setQueryParameter**(`param`, `value?`): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

Sets custom query parameter to add to the data requests

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `param` | `string` | `Record`<`string`, `string` | `number`&gt; | parameter name or custom parameters object (in name -> value format) |
| `Optional` `value` | `string` | `number` | parameter value |


#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[setQueryParameter](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#setqueryparameter)

#### setRequestResolution

▸ **setRequestResolution**(`resolution`): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

Sets the grid size for layer partitioning that is used for server requests

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `resolution` | `number` | grid size |


#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[setRequestResolution](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#setrequestresolution)

#### setServerURL

▸ **setServerURL**(`url`): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

Sets the server url to use for requesting

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `url` | `string` | `string`[] | server url |


#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[setServerURL](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#setserverurl)

#### setSilent

▸ **setSilent**(`bool`): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

Set silent mode

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `bool` | `boolean` | flag to enable silent mode |


#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[setSilent](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#setsilent)

#### setUniqueField

▸ **setUniqueField**(`field`): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

Sets the unique identifier for the features

#### Parameters

| Name  | Type  | Description  |
|  --- | --- | --- |
| `field` | `string` | unique identifier |


#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[setUniqueField](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#setuniquefield)

#### update

▸ **update**(): [`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

Aborts all the sent requests, resends the last one

#### Returns

[`GPX`](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.gpx.gpx)

this

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[update](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#update)

#### getClassName

▸ `Static` **getClassName**(): `string`

#### Returns

`string`

#### Inherited from

[Vector](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector).[getClassName](/solutions/geotoolkit/geotoolkit_js/apis/classes/geotoolkit.map.sources.vector.vector#getclassname-1)