automatic geojson file generation
This commit is contained in:
@@ -8,9 +8,6 @@ class Project extends PhpObject {
|
||||
const MODE_HISTO = 'H';
|
||||
const MODES = array('previz'=>self::MODE_PREVIZ, 'blog'=>self::MODE_BLOG, 'histo'=>self::MODE_HISTO);
|
||||
|
||||
//Folders
|
||||
const GEO_FOLDER = 'geo/';
|
||||
|
||||
//DB Tables
|
||||
const PROJ_TABLE = 'projects';
|
||||
|
||||
@@ -101,12 +98,11 @@ class Project extends PhpObject {
|
||||
case 2: $asProject['mode'] = self::MODE_HISTO; break;
|
||||
}
|
||||
|
||||
$sGeoFile = self::GEO_FOLDER.$asProject['geofile'];
|
||||
if(!file_exists($sGeoFile)) {
|
||||
if(!Converter::isGeoJsonValid($asProject['geofile'])) {
|
||||
(new Converter())->convertToGeoJson($asProject['geofile']);
|
||||
}
|
||||
|
||||
$asProject['geofile'] = Spot::addTimestampToFilePath($sGeoFile);
|
||||
$asProject['geofile'] = Spot::addTimestampToFilePath(Geo::getFilePath($asProject['geofile']));
|
||||
$asProject['codename'] = $sCodeName;
|
||||
$asProject['timezone_desc'] = Spot::getTimeZoneDesc($asProject['timezone']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user