API / geotoolkit / map / sources / connectors / Stub / Stub
connectors.Stub.Stub
Source connector that simulates the request sending and receives the predefined object
↳
Stub
Constructors
- [new Stub(options)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit.map.sources.connectors.stub.stub.md#new stub(options))
Methods
Constructors
• new Stub(options?)
| Name | Type | Description |
|---|---|---|
Optional options | Options | options |
AbstractConnector.constructor
Methods
▸ abort(key?): Stub
Aborts the previous queries sent
| Name | Type | Description |
|---|---|---|
Optional key | string | key of the queries to abort (all queries aborted if nothing provided) |
this
▸ Protected abortConnection(connection): Stub
Aborts the connection provided
| Name | Type | Description |
|---|---|---|
connection | any | connection to abort |
this
AbstractConnector.abortConnection
▸ Protected addConnection(key, connection): Stub
Adds connection to the list
| Name | Type | Description |
|---|---|---|
key | string | key of the connection (null if no provided) |
connection | any | connection to add to the list |
this
AbstractConnector.addConnection
▸ clone(): AbstractConnector<any>
All subclasses should override copyConstructor or provide custom implementation for this method
AbstractConnector<any>
clone
▸ getClassName(): string
string
AbstractConnector.getClassName
▸ Protected getConnection(key): any
Returns connection by the key
| Name | Type | Description |
|---|---|---|
key | string | key for the connection |
any
connection
AbstractConnector.getConnection
▸ isLoading(): boolean
Checks if some connections are still loading
boolean
▸ isValidUrl(): boolean
Check if URL is configured to load layer data
boolean
▸ Protected removeConnection(key, connection): Stub
Removes connection from the list
| Name | Type | Description |
|---|---|---|
key | string | key of the connection (null if no provided) |
connection | any | connection to remvoe from the list |
this
AbstractConnector.removeConnection
▸ send(url, options, callback): void
Load layer data based on configuration data is configured then it will load. callback is configured then it will triggered the callback function and load data once Promise is resolved.
| Name | Type | Description |
|---|---|---|
url | string | the url requested |
options | SendOptions | extra options for the request (null if no needed) |
callback | SendCallback | the result handler that's called when response is received |
void
▸ Static getClassName(): string
string