function getdirections_latlons in Get Directions 6.2
Same name and namespace in other branches
- 7.3 getdirections.module \getdirections_latlons()
- 7.2 getdirections.module \getdirections_latlons()
1 string reference to 'getdirections_latlons'
- getdirections_menu in ./
getdirections.module - Implementation of hook_menu().
File
- ./
getdirections.module, line 985 - Fetches google map directions.
Code
function getdirections_latlons($lls, $width = '', $height = '') {
$latlons = array();
$locs = array();
$arrlls = explode('|', $lls);
foreach ($arrlls as $key => $ll) {
if ($key > GETDIRECTIONS_WAYPOINTS_MAX && $key < count($arrlls)) {
continue;
}
if (!getdirections_latlon_check($ll)) {
watchdog('getdirections', 'Lat, Lon failed for !ll', array(
'!ll' => $ll,
), WATCHDOG_WARNING);
continue;
}
$latlons[] = $ll;
}
$content = getdirections_locations_via($locs, $latlons, $width, $height);
return $content;
}