/ui/utils/locationCount
Exports the default locationCount utility method as mapp.ui.utils.locationCount().
- Source
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:
Properties| Name | Type | Description |
|---|---|---|
layer | layer |
| Name | Type | Attributes | Description |
|---|---|---|---|
layer.key | String | The layers' identifier. | |
layer.format | String | The layer format. | |
layer.filter | Object | The filter currently active on the layer. | |
layer.params | Object | <optional> | The parameters for the layer data query. |
layer.mapview | Object | The mapview associated to the layer. | |
layer.queryparams | Object | <optional> | The query parameters that are being used on the layer. |
- Source
Returns:
The number of locations that pass the filter.
- Type:
- Integer