$max_lon = $parts[3]; $jsonGraphData = "http://" . $_SERVER['SERVER_NAME'] . getRelMainDir() . $flight->getJsonRelPath(); $kmz = $_SERVER['SERVER_NAME'] . "/{$baseInstallationPath}/" . $flight->getKMLRelPath(0); $kmz = str_replace('//', '/', $kmz); $kmz = str_replace('//', '/', $kmz); $flightKMZ = "http://" . $kmz; // access the kmz file and create it if it does not exists $kmlStr = $flight->kmlGetTrack("ff0000", 1, 2, 0); $markerIconUrl = $_SERVER['SERVER_NAME'] . getRelMainDir() . "/img/icon_cat_" . $flight->cat . ".png"; $markerIconUrl = str_replace('//', '/', $markerIconUrl); $markerIconUrl = str_replace('//', '/', $markerIconUrl); $markerIconUrl = "http://" . $markerIconUrl; // remove the string // var flightArray= // it is 16 bytes $flightJsonStr = file_get_contents($flight->getJsonFilename()); $flightJsonStr = substr($flightJsonStr, 16); $photosStr = " [] "; if ($flight->hasPhotos) { require_once dirname(__FILE__) . "/CL_flightPhotos.php"; $flightPhotos = new flightPhotos($flight->flightID); $flightPhotos->getFromDB(); // get geoinfo $flightPhotos->computeGeoInfo(); $imagesHtml = ""; $photosStr = ''; $pnum = 0; foreach ($flightPhotos->photos as $photoNum => $photoInfo) { //$photoInfo['lat']=51.8; //$photoInfo['lon']=14.0; if ($photoInfo['lat'] && $photoInfo['lon']) {