You are here

function getlocations_cb_w3w in Get Locations 7

Same name and namespace in other branches
  1. 7.2 getlocations.module \getlocations_cb_w3w()
1 string reference to 'getlocations_cb_w3w'
getlocations_menu in ./getlocations.module
Implements hook_menu().

File

./getlocations.module, line 2104
getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_cb_w3w() {
  $data = FALSE;
  $content = FALSE;
  if (isset($_REQUEST['data'])) {
    $data = $_REQUEST['data'];
  }
  if ($data) {
    if ($latlon = getlocations_latlon_check($data)) {

      # we have a latlon
      $type = 'position';
    }
    else {

      # must be a w3w
      $type = 'w3w';
    }
    $content = getlocations_cb_w3w_get($data, $type);
  }
  print $content;
  exit;
}