/location/nnearest
The module exports a utility method for the nnearest query template.
- Source
Requires
Methods
(inner) nnearest(params)
The nnearest method gets coordinates from a feature geometry passed in the params argument.
A parameterised query to the get_nnearest template will be sent. The n for the nearest records query param is implied by the count property value of a cluster feature.
The records returned from the query are presented in a list popup positioned on the feature geometry.
Clicking on a list element allows to get the location associated with the query response record.
Parameters:
PropertiesName | Type | Description |
---|---|---|
params | object | Parameter for the nnearest location query. |
Name | Type | Description |
---|---|---|
params.mapview | mapview | The mapview for locations layer. |
params.later | layer | The locations layer. |
params.feature | object | Query records nnearest to the feature.geometry. |
params.table | string | The database table for the query. |
- Source