You are here

function search_api_location_location_latlon_get in Search API Location 7.2

Retrieves the "latlon" property value for a location field.

Parameters

array $data: The available data for the field.

Return value

string|null The "latlon" property value, as a latitude/longitude pair in format "LAT,LON", if both values are set. NULL otherwise.

1 string reference to 'search_api_location_location_latlon_get'
search_api_location_location_properties in ./search_api_location.module
Adds additional properties to "Location" fields.

File

./search_api_location.module, line 221
Provides location based search functionality for the Search API.

Code

function search_api_location_location_latlon_get($data) {
  if (isset($data['latitude']) && isset($data['longitude'])) {
    return $data['latitude'] . ',' . $data['longitude'];
  }
  return NULL;
}