function getlocations_gps_coords in Get Locations 7
Same name and namespace in other branches
- 7.2 modules/getlocations_gps/getlocations_gps.module \getlocations_gps_coords()
1 call to getlocations_gps_coords()
- getlocations_fields_views_proximity_get_reference_location in modules/
getlocations_fields/ views/ getlocations_fields.views.inc - Helper function for proximity handlers. Retrieves the coordinates of the location that this field measures distances against.
File
- modules/
getlocations_gps/ getlocations_gps.module, line 372 - getlocations_gps.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_gps_coords() {
if (isset($_SESSION) && isset($_SESSION['getlocations_gps'])) {
$lat = $_SESSION['getlocations_gps']['lat'];
$lon = $_SESSION['getlocations_gps']['lon'];
}
if (isset($lat)) {
$coordinates = array();
$coordinates['latitude'] = (double) $lat;
$coordinates['longitude'] = (double) $lon;
return $coordinates;
}
return FALSE;
}