Class: Options

.xyz.maps.providers.HTTPProvider. Options

Configuration of providers.

Extends

Members Summary

headers :number

set custom url service headers.
custom headers will be applied to all request done by provider

level :number

zoom level at which tiles are cached.

name :string

Provider name

params :number

set custom url parameters.
custom parameters will be applied to all request done by provider

postProcessor :function

PostProcessor for remote data sources.
The PostProcessor will be executed just before created/modified or removed Features will be sent to the remote backend.
If the processor function is returning the processed data then its treated as a synchronous processor.
If the processor function does not return any value (undefined) or a Promise then its treated as asynchronous processor.
An asynchronous processor that's not using a Promise MUST call the input.ready(..) callback when data processing is finished.

Due to the execution of the processor in a separate worker thread the processor function must be scope independent.
The processor must be a "standalone function/class" that only depends on its own scope and only accesses its own local variables.
No references to the outer scope of the processor function are allowed.

PostProcessorData:
{put: GeoJsonFeature[],remove: GeoJsonFeature[]}
PostProcessor:
({data: PostProcessorData, ready: (data) => void) => PostProcessorData | Promise

preProcessor :function

PreProcessor for remote data sources.
The PreProcessor will be executed just after Features are received from remote backend.
If the processor function is returning the processed data then its treated as a synchronous processor.
If the processor function does not return any value (undefined) or a Promise then its treated as asynchronous processor.
An asynchronous processor that's not using a Promise MUST call the input.ready(..) callback when data processing is finished.

Due to the execution of the processor in a separate worker thread the processor function must be scope independent.
The processor must be a "standalone function/class" that only depends on its own scope and only accesses its own local variables.
No references to the outer scope of the processor function are allowed.

PreProcessor:
({data: any[], ready: (GeoJsonFeature[]) => void, tile?:{x:number,y:number,z:number}) => GeoJsonFeature[] | Promise

url :string|function

url for requesting tiles.

It is either a string which may contain following flags that will be replaced by provider:
- {SUBDOMAIN_CHAR}: subdomain id(a, b, c and d) for balancing the load
- {SUBDOMAIN_INT}: subdomain id(0,1,2 and 3) for balancing the load
- {SUBDOMAIN_INT_1_4}: subdomain id(1,2,3 and 4) for balancing the load
- {QUADKEY}: quadkey of the tile to be requested
- {Z}: z of the tile to be requested
- {X}: x of the tile to be requested
- {Y}: y of the tile to be requested

or a callback function that's called with the following parameters x,y,z,quadkey and need to returns the url for requesting tiles.
The callback function needs to handle custom parameters by its own.

Members Details

headers :number

set custom url service headers.
custom headers will be applied to all request done by provider
Type:
number

level :number

zoom level at which tiles are cached.
Type:
number
Inherited From:

name :string [Optional]

Provider name
Type:
string
Inherited From:

params :number

set custom url parameters.
custom parameters will be applied to all request done by provider
Type:
number

postProcessor :function [Optional]

PostProcessor for remote data sources.
The PostProcessor will be executed just before created/modified or removed Features will be sent to the remote backend.
If the processor function is returning the processed data then its treated as a synchronous processor.
If the processor function does not return any value (undefined) or a Promise then its treated as asynchronous processor.
An asynchronous processor that's not using a Promise MUST call the input.ready(..) callback when data processing is finished.

Due to the execution of the processor in a separate worker thread the processor function must be scope independent.
The processor must be a "standalone function/class" that only depends on its own scope and only accesses its own local variables.
No references to the outer scope of the processor function are allowed.

PostProcessorData:
{put: GeoJsonFeature[],remove: GeoJsonFeature[]}
PostProcessor:
({data: PostProcessorData, ready: (data) => void) => PostProcessorData | Promise
Type:
function
Inherited From:

preProcessor :function [Optional]

PreProcessor for remote data sources.
The PreProcessor will be executed just after Features are received from remote backend.
If the processor function is returning the processed data then its treated as a synchronous processor.
If the processor function does not return any value (undefined) or a Promise then its treated as asynchronous processor.
An asynchronous processor that's not using a Promise MUST call the input.ready(..) callback when data processing is finished.

Due to the execution of the processor in a separate worker thread the processor function must be scope independent.
The processor must be a "standalone function/class" that only depends on its own scope and only accesses its own local variables.
No references to the outer scope of the processor function are allowed.

PreProcessor:
({data: any[], ready: (GeoJsonFeature[]) => void, tile?:{x:number,y:number,z:number}) => GeoJsonFeature[] | Promise
Type:
function
Inherited From:

url :string|function

url for requesting tiles.

It is either a string which may contain following flags that will be replaced by provider:
- {SUBDOMAIN_CHAR}: subdomain id(a, b, c and d) for balancing the load
- {SUBDOMAIN_INT}: subdomain id(0,1,2 and 3) for balancing the load
- {SUBDOMAIN_INT_1_4}: subdomain id(1,2,3 and 4) for balancing the load
- {QUADKEY}: quadkey of the tile to be requested
- {Z}: z of the tile to be requested
- {X}: x of the tile to be requested
- {Y}: y of the tile to be requested

or a callback function that's called with the following parameters x,y,z,quadkey and need to returns the url for requesting tiles.
The callback function needs to handle custom parameters by its own.
Type:
string | function
Example:
// string
url: 'https://xyz.api.here.com/hub/spaces/mySpace/tile/quadkey/{QUADKEY}?access_token=myAccessToken'
// callback function
url: (z, y, x, quadkey) => {
    return 'https://xyz.api.here.com/hub/spaces/mySpace/tile/quadkey/' + quadkey + '?access_token=myAccessToken';
}