Maps API for JavaScript Developer's Guide

H.map.provider.ImageTileProvider.Options

Type Definition Summary

This object encapsulates configuration options for an ImageTileProvider instance.

[ For full details, see the Type Definition Details ]

Property Summary

Table 1. Properties
Properties

uri

The provider's unique resource identifier which must not contain an underscore "_". If omitted, an auto-generated unique session ID is used. This property must be specified if a consistent ID across sessions is needed (for example for storing provider data).

min

The minimum supported zoom level, the default is 0

max

The maximum supported zoom level, the default is 22

opacity

The opacity to use for the rendering of the provided tiles in range [0..1] where 0.0 means full transparent and 1.0 means full opaque. The default is 1.0.

getCopyrights

A function to replace the default implementation of H.map.provider.Provider#getCopyrights

tileSize

The size of a tile as edge length in pixels. It must be 2^n where n is in the range [0 ... 30], the default is 256

getURL

The function to create an URL for a specified tile. It gets the tile coordinates x, y and z as arguments. To signalize, that the specified tile is not provided, it has to return a falsy value like undefined.

crossOrigin

The value to use for the crossOrigin attribute of the tile images, if omitted the attribute is set to "anonymous". For more details see MDN web docs.

Type Definition Description

This object encapsulates configuration options for an ImageTileProvider instance.

Property Details

uri: {string=} [optional]

The provider's unique resource identifier which must not contain an underscore "_". If omitted, an auto-generated unique session ID is used. This property must be specified if a consistent ID across sessions is needed (for example for storing provider data).

min: {number=} [optional]

The minimum supported zoom level, the default is 0

max: {number=} [optional]

The maximum supported zoom level, the default is 22

opacity: {number=} [optional]

The opacity to use for the rendering of the provided tiles in range [0..1] where 0.0 means full transparent and 1.0 means full opaque. The default is 1.0.

getCopyrights: {(function(H.geo.Rect, number) : ?Array<H.map.ICopyright>)=} [optional]

A function to replace the default implementation of H.map.provider.Provider#getCopyrights

tileSize: {number=} [optional]

The size of a tile as edge length in pixels. It must be 2^n where n is in the range [0 ... 30], the default is 256

getURL: {function(number, number, number) : (string | undefined)}

The function to create an URL for a specified tile. It gets the tile coordinates x, y and z as arguments. To signalize, that the specified tile is not provided, it has to return a falsy value like undefined.

crossOrigin: {?string=} [optional]

The value to use for the crossOrigin attribute of the tile images, if omitted the attribute is set to "anonymous". For more details see MDN web docs.