geohash #
Returns a valid geohash for the provided key's members (see geoadd).
geohash(key, members, [options], callback) #
Arguments | Type | Description |
---|---|---|
key | string | Key identifier |
members | array | List of geospatial points contained in the key |
options | JSON Object | Optional parameters |
callback | function | Callback |
Options #
Option | Type | Description | Default |
---|---|---|---|
queuable | boolean | Make this request queuable or not | true |
Callback Response #
Returns an array of geohashes, in the same order than the provided members list.
Usage #
// Using callbacks (NodeJS or Web Browser)
kuzzle.memoryStorage.geohash('key', ['Palermo', 'Catania'], function (err, hashes) {
// callback called once the action has completed
});
// Using promises (NodeJS only)
kuzzle.memoryStorage.geohashPromise('key', ['Palermo', 'Catania'])
.then(hashes => {
// resolved once the action has completed
});
Callback response:
["sqc8b49rny0", "sqdtr74hyu0"]
Edit this page on Github(opens new window)