Adding elevation chart

This commit is contained in:
2019-02-14 22:59:32 +01:00
parent 34a7cf6b08
commit 299e4c8a54
14 changed files with 1001 additions and 92 deletions

View File

@@ -48,7 +48,8 @@ class Spot extends Main
$asClasses = array(
array('name'=>'project', 'project'=>true),
array('name'=>'picture', 'project'=>true),
array('name'=>'cacher', 'project'=>true)
array('name'=>'cacher', 'project'=>true),
array('name'=>'converter', 'project'=>true)
);
parent::__construct($oClassManagement, $sProcessPage, $asClasses);
@@ -140,6 +141,7 @@ class Spot extends Main
'index',
array(
'filepath_css' => self::addTimestampToFilePath('style/spot.css'),
'filepath_js_d3' => self::addTimestampToFilePath('script/d3.min.js'),
'filepath_js_leaflet' => self::addTimestampToFilePath('script/leaflet.min.js'),
'filepath_js_jquery' => self::addTimestampToFilePath('script/jquery.min.js'),
'filepath_js_jquery_mods' => self::addTimestampToFilePath('script/jquery.mods.js'),
@@ -436,6 +438,10 @@ class Spot extends Main
$sToken = Settings::IGN_FR_KEY;
$sReferer = 'https://www.visugpx.com/yfJDwfuTlf';
break;
case 'opentopomap':
$sPattern = 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png';
$asDomains = array('a', 'b', 'c');
break;
case 'static':
$sPattern = 'https://api.mapbox.com/v4/mapbox.satellite/url-https%3A%2F%2Fspot.lutran.fr%2Fimages%2Ffootprint_mapbox.png({x},{y})/{x},{y},{z}/400x300.png?access_token={token}';
$sToken = Settings::MAPBOX_KEY;
@@ -455,9 +461,8 @@ class Spot extends Main
}
public function convertGpxToGeoJson() {
$this->oClassManagement->incClass('converter', true);
$oConverter = new Converter($this->oProject);
return $oConverter->convertToGeoJson();
$oConverter = new Converter();
return $oConverter->convertToGeoJson($this->oProject->getGeoFile());
}
public static function DecToDMS($dValue, $sType='lat') {