Interface: IMarkerLayer

H.map.layer.IMarkerLayer

This interface defines a layer which provides marker objects to the renderer.

Adding a layer implementing this interface to the layer collection causes the render engine to render marker objects provided by the requestMarkers() function.

Methods

requestDomMarkers (boundingBox, zoomLevel, cacheOnly, prioCenter)H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse

This method requests DOM marker objects for a bounding rectangle.

The implementation of this method must return all DOM marker objects which are contained within the bounding rectangle.

The response object returned by this method must contain the number of objects which intersect with the bounding rectangle.

This method is called by the renderer in each rendering cycle. An implementing object must make sure that calling this method does not impede the rendering process.

Name Type Description
boundingBox H.geo.Rect

The rectangular area for which marker are to be retrieved

zoomLevel number

The zoom level for which the objects are requested

cacheOnly boolean

A value indicating whether only cached objects are to be considered true

prioCenter H.math.Point

The priority center as an offset in screen pixel relative to the center

Returns:
Type Description
H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse a response object containing the number of markers and the markers themselves

requestMarkers (boundingBox, zoomLevel, cacheOnly, prioCenter)H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse

This method requests marker objects for a bounding rectangle.

The implementation of this method must return all marker objects which are contained within the bounding rectangle.

The response object returned by this method must contain the number of objects which intersect with the bounding rectangle.

This method is called by the renderer in each rendering cycle. An implementing object must make sure that calling this method does not impede the rendering process.

Name Type Description
boundingBox H.geo.Rect

The rectangular area for which marker are to be retrieved

zoomLevel number

The zoom level for which the objects are requested

cacheOnly boolean

A value indicating whether only cached objects are to be considered true

prioCenter H.math.Point

The priority center as an offset in screen pixels relative to the center

Returns:
Type Description
H.map.layer.IMarkerLayer.Response | H.map.layer.IMarkerLayer.TiledResponse A response object containing the number of markers and the markers themselves

Type Definitions

H.map.layer.IMarkerLayer.Response Object

This type represents a response object returned by the H.map.layer.IMarkerLayer#requestMarkers function.

Properties:
Name Type Description
total number

The total number of markers, inclusive markers with not ready icons

markers Array.<H.map.AbstractMarker>

The marker objects for the bounding rectangle (only ready).

H.map.layer.IMarkerLayer.TiledResponse Object

This type represents a response object returned by the H.map.layer.IMarkerLayer#requestMarkers function.

Properties:
Name Type Description
total number

A value indicating the number of returned tiles

requested number

A value indicating the number of requested tiles

markers Array.<H.map.AbstractMarker>

An array of the marker objects within requested tiled area