This interface describes a layer which provides data partitioned in quad-tree tiles in an x, y, z fashion (where z describes the level within the tree and x and y describe the absolute column and row indices within the level).
Adding a layer implementing this interface to the layer collection causes
the render engine to retrieve tiles and render the data contained within the
tiles (see H.map.provider.Tile).
Methods
-
This method cancels a previously requested tile.
Name Type Description xnumber Tile row position
ynumber Tile column position
znumber Zoom level
-
requestTile (x, y, z, cacheOnly)H.map.provider.Tile | undefined
-
This method requests a single tile for the specified tile coordinates.
Name Type Description xnumber Tile row position
ynumber Tile column position
znumber The zoom level for which the tile is requested
cacheOnlyboolean A value indicating whether only cached tiles are to be considered
trueReturns:
Type Description H.map.provider.Tile | undefined A tile object matching the supplied coordinates if the tile is already loaded, otherwise the method starts loading the tile and returns undefined -
requestTiles (boundingBox, zoomLevel, cacheOnly, prioCenter, opt_requesterId)H.map.layer.ITileLayer.Response
-
This method requests tiles for a specific bounding box and zoom level (z-value).
An implementing object must calculate the tile grid which intersects with the bounding box. An
ITileLayerdoes not need to return all tiles immediately (as loading tile data from remote sources may be asynchronous). The implementing object may return a partial response if the full response cannot be synchronously provided to the renderer.The response object returned by this method must contain the number of tiles which intersect with the bounding box at the zoom level specified by the caller.
This method is called by the renderer for each rendering cycle. An implementing object must make sure that calling this method does not impede the rendering process, therefore caching of remote objects is strongly advised.
Name Type Description boundingBoxH.geo.Rect The rectangular area for which tiles are to be returned
zoomLevelnumber The zoom level for which the tiles are requested
cacheOnlyboolean Indicates whether only cached tiles are to be considered (
true)prioCenterH.math.Point The priority center as an offset in screen pixel relative to the center
opt_requesterId* optional Unique identifier of the requester, is used when layer is shared between different maps
Returns:
Type Description H.map.layer.ITileLayer.Response A response object containing the total number of tiles requested and the tile objects that could be immediately returned
Type Definitions
-
This object defines the configuration options which are used to initialize a
TileLayerinstance.Properties:
Name Type Argument Description minnumber <optional>
The minimum zoom level for which the layer is considered for rendering, the default is
0maxnumber <optional>
The maximum zoom level for which the layer is considered for rendering, the default is
22darkboolean <optional>
Indicates whether the content of the given layer is mainly dark, the default is
falseSee alsoH.Map.Options#autoColorprojectionH.geo.IProjection <optional>
The projection to be used for the given layer, the default is
H.geo.mercator -
This is a response object for a tile request. It contains the total number of elements requested and an array of currently available tiles.
Properties:
Name Type Description totalnumber The total number of requested tiles
tilesArray.<H.map.provider.Tile> The tiles which the provider can currently return synchronously