H.map.layer.ITileLayer
Interface Summary
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).
[ For full details, see the Interface Details ]
Method Summary
Methods |
---|
This method requests tiles for a specific bounding rectangle and zoom level (z-value). |
This method requests a single tile for the specified tile coordinates. |
This method cancels a previously requested tile. |
Interface Description
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).
Method Details
requestTiles (boundingRect, zoomLevel, cacheOnly, prioCenter, opt_requesterId) : {H.map.layer.ITileLayer.Response}
This method requests tiles for a specific bounding rectangle and zoom level (z-value).
An implementing object must calculate the tile grid which intersects with the bounding rectangle. An ITileLayer
does 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 rectangle 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.
- Parameters:
-
boundingRect
: -
{H.geo.Rect}
- the bounding rectangle for which tiles are to be returned
-
zoomLevel
: -
{number}
- The zoom level for which the tiles are requested
-
cacheOnly
: -
{boolean}
- Indicates whether only cached tiles are to be considered (
true
) -
prioCenter
: -
{H.math.Point}
- The priority center as an offset in screen pixel relative to the center
-
opt_requesterId
: -
{*=} [optional]
- Unique dentifier of the requester, is used when layer is shared between different maps
- Returns:
-
{H.map.layer.ITileLayer.Response}
- A response object containing the total number of tiles requested and the tile objects that could be immediately returned
requestTile (x, y, z, cacheOnly) : {(H.map.provider.Tile | undefined)}
This method requests a single tile for the specified tile coordinates.
- Parameters:
-
x
: -
{number}
- Tile row position
-
y
: -
{number}
- Tile column position
-
z
: -
{number}
- The zoom level for which the tile is requested
-
cacheOnly
: -
{boolean}
- A value indicating whether only cached tiles are to be considered
true
- Returns:
-
{(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
cancelTile (x, y, z)
This method cancels a previously requested tile.
- Parameters:
-
x
: -
{number}
- Tile row position
-
y
: -
{number}
- Tile column position
-
z
: -
{number}
- Zoom level