You are here

function getdirections_ip_geoloc in Get Directions 7.3

Same name and namespace in other branches
  1. 7.2 getdirections.module \getdirections_ip_geoloc()

Return value

Returns location array

1 string reference to 'getdirections_ip_geoloc'
getdirections_menu in ./getdirections.module
Implement hook_menu().

File

./getdirections.module, line 2010
Fetches google map directions.

Code

function getdirections_ip_geoloc() {
  if (module_exists('ip_geoloc')) {
    $location = FALSE;
    if (isset($_SESSION['ip_geoloc']['location'])) {
      $location = $_SESSION['ip_geoloc']['location'];
    }
    drupal_json_output($location);
  }
  exit;
}