You are here

function getdirections_latlon in Get Directions 7.3

Same name and namespace in other branches
  1. 6.2 getdirections.module \getdirections_latlon()
  2. 7.2 getdirections.module \getdirections_latlon()

Function to setup the map and form

Parameters

string $direction: Required. The direction the supplied input applies to

string $latlon: Required. A latitude,longitude pair

string $locs: Optional. a description of the target.

Return value

Returns the themed map and form

1 call to getdirections_latlon()
getdirections_direction_box in ./getdirections.module
for colorbox and suchlike
1 string reference to 'getdirections_latlon'
getdirections_menu in ./getdirections.module
Implement hook_menu().

File

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

Code

function getdirections_latlon($direction, $latlon, $locs = '', $width = '', $height = '') {
  $country = '';
  $id = 0;
  $type = 'other';
  if (!getdirections_latlon_check($latlon)) {
    watchdog('getdirections', 'Lat, Lon failed for user id !uid', array(
      '!uid' => $uid,
    ), WATCHDOG_WARNING);
    $latlon = getdirections_load_latlon_defaults();
  }
  $content = getdirections_direction_other($direction, $locs, $country, $latlon, $id, $type, $width, $height);
  return $content;
}