SDK
SDK Javascript v5.x
1

You are currently looking at the documentation of a previous version of Kuzzle. We strongly recommend that you use the latest version. You can also use the version selector in the top menu.

geopos #

Returns the positions (longitude, latitude) of the provided key's members (see geoadd).

[Redis documentation]


geopos(key, members, [options], callback) #

ArgumentsTypeDescription
keystringKey identifier
membersarrayList of geospatial points contained in the key
optionsJSON ObjectOptional parameters
callbackfunctionCallback

Options #

OptionTypeDescriptionDefault
queuablebooleanMake this request queuable or nottrue

Callback Response #

Returns an array of longitude-latitude pairs, in the same order as the provided members list.

Usage #

// Using callbacks (NodeJS or Web Browser)
kuzzle.memoryStorage.geopos('key', ['Palermo', 'Catania'], function (err, positions) {
  // callback called once the action has completed
});
// Using promises (NodeJS only)
kuzzle.memoryStorage.geoposPromise('key', ['Palermo', 'Catania'])
  .then(positions => {
    // resolved once the action has completed
  });

Callback response:

[[13.361389, 38.115556], [15.087269, 37.502669]]