Maps API for JavaScript Developer's Guide

H.service.extension.TileProvider.Options

Type Definition Summary

Configuration object which can be used to initialize the H.service.extension.TileProvider.

[ 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. If a consistent ID across sessions is needed (for example for storing provider data), this property must be specified.

min

The minimum zoom level for which tiles are provided. This option can be specified to prevent fetching of a big amount of data.

max

The maximum zoom level for which tiles are provided.

tileSize

The size of the tiles rendered by this provider (must be a power of 2, default is 256).

pixelRatio

The pixel ratio to use for over-sampling in cases of high-resolution displays.

tileCacheSize

The maximal number of tiles that are cached.

resultType

The type of resulting map objects to render.

styleCallback

An optional callback to provide a style for a resulting map object. If the callback returns not undefined then it must return a style that matches the specified H.service.extension.TileProvider.Options#resultType. For example if the resultType is set to H.service.extension.TileProvider.ResultType.MARKER, the function must return an H.map.Icon. Note that it is highly recommended to reuse same style instance for identical styled objects to achieve higher rendering performance.

Type Definition Description

Configuration object which can be used to initialize the H.service.extension.TileProvider.

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. If a consistent ID across sessions is needed (for example for storing provider data), this property must be specified.

min: {number=} [optional]

The minimum zoom level for which tiles are provided. This option can be specified to prevent fetching of a big amount of data.

max: {number=} [optional]

The maximum zoom level for which tiles are provided.

tileSize: {number=} [optional]

The size of the tiles rendered by this provider (must be a power of 2, default is 256).

pixelRatio: {number=} [optional]

The pixel ratio to use for over-sampling in cases of high-resolution displays.

tileCacheSize: {number=} [optional]

The maximal number of tiles that are cached.

resultType: {H.service.extension.TileProvider.ResultType}

The type of resulting map objects to render.

styleCallback: {H.service.extension.TileProvider.StyleCallback=} [optional]

An optional callback to provide a style for a resulting map object. If the callback returns not undefined then it must return a style that matches the specified H.service.extension.TileProvider.Options#resultType. For example if the resultType is set to H.service.extension.TileProvider.ResultType.MARKER, the function must return an H.map.Icon. Note that it is highly recommended to reuse same style instance for identical styled objects to achieve higher rendering performance.