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

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

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';
}