convertGeopoint() (static) #
Deprecated since 2.14.0
Converts a geopoint, in one of the formats accepted by Koncorde geospatial clauses, to a standardized { lat, lon } object.
Arguments #
static convertGeopoint(point: string | JSONObject): { lat: number, lon: number };| Arguments | Type | Description |
|---|---|---|
point | string | JSONObject | Geopoint (e.g. "43.6,3.9", { lat: 43.6, lon: 3.9 }, { latLon: [43.6, 3.9] }, a geohash) |
Return #
The convertGeopoint function returns a { lat, lon } object, or null if the format is not recognized.
Usage #
import { Koncorde } from 'kuzzle';
Koncorde.convertGeopoint('43.6,3.9'); // { lat: 43.6, lon: 3.9 }