'callback' => function( $request ) {
// Defaults
- $limit = 1;
-
// Parameter collection & assignment
$this->params = $request->get_params();
- $latMin = $this->params['latMin'];
+ $addons = explode( ",", $this->params['addons'] );
+
+ $latMin = $this->params['latMin'] ?? -90.0;
$lastLatMin = $this->params['lastLatMin'];
- $latMax = $this->params['latMax'];
+ $latMax = $this->params['latMax'] ?? 90.0;
$lastLatMax = $this->params['lastLatMax'];
- $lonMin = $this->params['lonMin'];
+ $lonMin = $this->params['lonMin'] ?? -180.0;
$lastLonMin = $this->params['lastLonMin'];
- $lonMax = $this->params['lonMax'];
+ $lonMax = $this->params['lonMax'] ?? 180.0;
$lastLonMax = $this->params['lastLonMax'];
- $poiRequest = $this->params['poiRequest'];
+ $poiRequest = $this->params['poiRequest'] ?? "Anywhere";
- $addons = explode( ",", $this->params['addons'] );
$searchText = "test";
- if (isset($this->params['limit'])) {
- $limit = $this->params['limit'];
- }
+ $limit = $this->params['limit'] ?? 5;
//$mapItems = $MapItems->modelAction($data['request'], $data['area'], $data['filter']);