array( // endpoint for getting members
'methods' => WP_REST_Server::READABLE,
'callback' => function( $request ) {
+
+
+ $latMin = $this->params['latMin'];
+ $lastLatMin = $this->params['lastLatMin'];
+ $latMax = $this->params['latMax'];
+ $lastLatMax = $this->params['lastLatMax'];
+ $lonMin = $this->params['lonMin'];
+ $lastLonMin = $this->params['lastLonMin'];
+ $lonMax = $this->params['lonMax'];
+ $lastLonMax = $this->params['lastLonMax'];
+
+
// Callback function can be a lot shorter.
// You could just create a new model to get the results in an array
// and use return rest_ensure_response( $data );