You are here

private function views_geojson_bbox_argument::_check_bbox_coords in Views GeoJSON 7

Check if the BBOX coordinates are valid coordinates.

Currently only checks if coordinates are numeric.

@TODO: if supported by projection this could include degree checking.

1 call to views_geojson_bbox_argument::_check_bbox_coords()
views_geojson_bbox_argument::_explode_bbox_coords in views/views_geojson_bbox_argument.inc
Split BBOX string into {left, bottom, right, top}.

File

views/views_geojson_bbox_argument.inc, line 203

Class

views_geojson_bbox_argument
Custom filter to return only points within a provided bounding box.

Code

private function _check_bbox_coords($bbox_coords) {
  foreach ($bbox_coords as $coord) {
    if (!is_numeric($coord)) {
      return FALSE;
    }
  }
  return TRUE;
}