Interface: ISpatialLayer

H.map.layer.ISpatialLayer

This interface defines a layer which provides spatial objects (i.e. polylines and polygons) to the renderer.

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

Methods

requestSpatials (boundingBox, zoomLevel, cacheOnly)Array.<!H.map.Object>

This method requests spatial objects for a bounding rectangle.

The implementation of this method must return all spatial objects which intersect with this bounding rectangle.

Name Type Description
boundingBox H.geo.Rect

The rectangular area for which spatial objects are to be returned

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

Returns:
Type Description
Array.<!H.map.Object> A list of spatial objects within the requested area