--- a/busui/common.inc.php +++ b/busui/common.inc.php @@ -12,16 +12,16 @@ return true; } -function include_header($pageTitle) { +function include_header($pageTitle, $opendiv = true, $geolocate = false) { // if (isDebug()) // set php error level high echo ' bus.lambdacomplex.org - '.$pageTitle.' - + +src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"> @@ -29,11 +29,12 @@ - -
+ '; +if ($opendiv) echo '
-

'.$pageTitle.'

+

'.$pageTitle.'

+ Home
'; } @@ -85,6 +86,24 @@ } return $f; } + +function staticmap($mapPoints) +{ +$width = 300; +$height = 300; + if (sizeof($mapPoints) < 1) return ""; + if (sizeof($mapPoints) === 1) $center = "{$mapPoints[0][0]},{$mapPoints[0][1]}"; + if (sizeof($mapPoints) > 1) $center = "{$mapPoints[0][0]},{$mapPoints[0][1]}"; //TODO average points + $markers = ""; + foreach ($mapPoints as $index => $mapPoint) { + if (sizeof($mapPoints) === 1) { + $markers .= $mapPoint[0].",".$mapPoint[1].",ol-marker"; + } else { + $markers .= $mapPoint[0].",".$mapPoint[1].",lightblue".($index+1); + } + } + return ''; +} ?>