geopos #
Returns the positions (longitude, latitude) of the provided key's members (see geoadd).
geopos(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 longitude-latitude pairs, in the same order as the provided members list.
Usage #
<?php
use \Kuzzle\Kuzzle;
$kuzzle = new Kuzzle('localhost');
try {
$positions = $kuzzle->memoryStorage()->geopos('key', ['Palermo', 'Catania']);
}
catch (ErrorException $e) {
}
Callback response:
[[13.361389, 38.115556], [15.087269, 37.502669]]
Edit this page on Github(opens new window)