Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface OmvRestClientParameters

Hierarchy

  • OmvRestClientParameters

Index

Properties

Optional apiFormat

apiFormat: APIFormat

The REST API format to use for the tile path generation, will default to the HERE Vector Tile API.

Optional authenticationCode

authenticationCode: string | AuthenticationCodeProvider

Authentication code used for the different APIs.

remarks

When AuthenticationCodeProvider is is used as value, the provider is called before each to get currently valid authentication code/token.

see

APIFormat for the query parameter this is used with.

Optional authenticationMethod

authenticationMethod: AuthenticationMethodInfo

Specifies [[AuthMethod]] to be used when requesting tiles.

remarks

Defaults for each APIFormat are documented with each format type.

Optional baseUrl

baseUrl: undefined | string

The base URL of the REST Tile Service.

see

APIFormat for the definition of baseUrl.

Optional downloadManager

downloadManager: ITransferManager

Transfer Manager to use; creates an own instance if none passed.

Optional getBearerToken

getBearerToken: undefined | (() => Promise<string>)

Function to retrieve the Bearer Token

deprecated

Please use authenticationCode.

Optional tilingScheme

tilingScheme: TilingScheme

Tiling scheme is used in some of the APIs, not implemented yet.

Optional url

url: undefined | string

URL pattern used to fetch tile files.

remarks

URL with special keywords replaced to retrieve specific tile:

  • {z} - zoom level of tile, @see {@link @here/harp-geoutils#TileKey.level}
  • {x} - horizontal coordinate of tile (column number),
        see {@link @here/harp-geoutils#TileKey.column}
  • {y} - vertical coordinate of Tile (row number),
        see {@link @here/harp-geoutils#TileKey.row}

Examples of url patterns:

  https://my-base-url.com/vector-tiles/{z}/{x}/{y}.mvt
  https://xyz.api.here.com/tiles/herebase.02/{z}/{x}/{y}/omv
  https://xyz.api.here.com/tiles/osmbase/512/all/{z}/{x}/{y}.mvt

Note: To add authentication headers and/or query params, use [[authMethod]], urlParams properties or embed token directly in url.

Complete examples:

// XYZ OSM with authentication using query param
{
    url: "https://xyz.api.here.com/tiles/osmbase/512/all/{z}/{x}/{y}.mvt",
    urlParams: {
          access_token: accessToken
    },
}
// HERE Vector Tile with authentication using bearer token retrieved by callback
{
    url: "https://vector.hereapi.com/v2/vectortiles/base/mc/{z}/{x}/{y}/omv",
    authenticationMethod: AuthenticationTypeBearer,
    authenticationCode: () => getBearerToken()
}

Optional urlParams

urlParams: undefined | {}

Array of query parameters to be appended at the end of the url. It is empty by default.

Generated using TypeDoc