You are here

public function SearchApiViewsHandlerArgumentLocationPoint::query in Search API Location 7.2

Accepts a $this->argument of any value that geoPHP can load.

Overrides SearchApiViewsHandlerArgument::query

File

search_api_location_views/handler_argument_location.inc, line 75
Provides the views argument handler for location fields.

Class

SearchApiViewsHandlerArgumentLocationPoint
Handler class for a Views location arguments.

Code

public function query($group_by = FALSE) {
  if ($point = $this
    ->_parse_point($this->argument)) {

    // Add lat lon to the options array for this field.
    $location_options = (array) $this->query
      ->getOption('search_api_location');
    $this
      ->_add_field_options($location_options, $point, $this->real_field);
    $this->query
      ->setOption('search_api_location', $location_options);
  }
}