/ui/utils/locationCount

Exports the default locationCount utility method as mapp.ui.utils.locationCount().

Methods

(inner) locationCount(layer) → {Integer}

Returns the length of the layer.Features[] array or the response from a layer_count query.

The layer.Features[] array length is returned if the filter is not restricted to the viewport, or if the layer features have been loaded for the viewport. Cluster layer features are not counted as locations.

Parameters:
NameTypeDescription
layerlayer
Properties
NameTypeAttributesDescription
layer.keyString

The layers' identifier.

layer.formatString

The layer format.

layer.filterObject

The filter currently active on the layer.

layer.paramsObject<optional>

The parameters for the layer data query.

layer.mapviewObject

The mapview associated to the layer.

layer.queryparamsObject<optional>

The query parameters that are being used on the layer.

Returns:

The number of locations that pass the filter.

Type: 
Integer