Add altitude on image
This commit is contained in:
@@ -76,7 +76,7 @@ class Media extends PhpObject {
|
|||||||
if($bOwnMedia && empty($this->asMedia) || !$bOwnMedia && empty($this->asMedias) || $bConstraintArray) {
|
if($bOwnMedia && empty($this->asMedia) || !$bOwnMedia && empty($this->asMedias) || $bConstraintArray) {
|
||||||
if($this->oProject->getProjectId()) {
|
if($this->oProject->getProjectId()) {
|
||||||
$asParams = array(
|
$asParams = array(
|
||||||
'select' => array(Db::getId(self::MEDIA_TABLE), 'filename', 'taken_on', 'posted_on', 'timezone', 'latitude', 'longitude', 'width', 'height', 'rotate', 'type AS subtype', 'comment'),
|
'select' => array(Db::getId(self::MEDIA_TABLE), 'filename', 'taken_on', 'posted_on', 'timezone', 'latitude', 'longitude', 'altitude', 'width', 'height', 'rotate', 'type AS subtype', 'comment'),
|
||||||
'from' => self::MEDIA_TABLE,
|
'from' => self::MEDIA_TABLE,
|
||||||
'constraint'=> array(Db::getId(Project::PROJ_TABLE) => $this->oProject->getProjectId())
|
'constraint'=> array(Db::getId(Project::PROJ_TABLE) => $this->oProject->getProjectId())
|
||||||
);
|
);
|
||||||
@@ -128,9 +128,9 @@ class Media extends PhpObject {
|
|||||||
'taken_on' => date(Db::TIMESTAMP_FORMAT, ($asMediaInfo['taken_ts'] > 0)?$asMediaInfo['taken_ts']:$asMediaInfo['file_ts']),
|
'taken_on' => date(Db::TIMESTAMP_FORMAT, ($asMediaInfo['taken_ts'] > 0)?$asMediaInfo['taken_ts']:$asMediaInfo['file_ts']),
|
||||||
'posted_on' => date(Db::TIMESTAMP_FORMAT, $asMediaInfo['file_ts']),
|
'posted_on' => date(Db::TIMESTAMP_FORMAT, $asMediaInfo['file_ts']),
|
||||||
'timezone' => $asMediaInfo['timezone'],
|
'timezone' => $asMediaInfo['timezone'],
|
||||||
'latitude' => $asMediaInfo['latitude'],
|
'latitude' => is_null($asMediaInfo['latitude'])?'NULL':$asMediaInfo['latitude'],
|
||||||
'longitude' => $asMediaInfo['longitude'],
|
'longitude' => is_null($asMediaInfo['longitude'])?'NULL':$asMediaInfo['longitude'],
|
||||||
'altitude' => $asMediaInfo['altitude'],
|
'altitude' => is_null($asMediaInfo['altitude'])?'NULL':$asMediaInfo['altitude'],
|
||||||
'width' => $asMediaInfo['width'],
|
'width' => $asMediaInfo['width'],
|
||||||
'height' => $asMediaInfo['height'],
|
'height' => $asMediaInfo['height'],
|
||||||
'rotate' => $asMediaInfo['rotate'],
|
'rotate' => $asMediaInfo['rotate'],
|
||||||
@@ -160,9 +160,9 @@ class Media extends PhpObject {
|
|||||||
$iHeight = 0;
|
$iHeight = 0;
|
||||||
$sRotate = '0';
|
$sRotate = '0';
|
||||||
$sTakenOn = '';
|
$sTakenOn = '';
|
||||||
$fLat = 0;
|
$fLat = null;
|
||||||
$fLng = 0;
|
$fLng = null;
|
||||||
$iAlt = 0;
|
$iAlt = null;
|
||||||
switch($sType) {
|
switch($sType) {
|
||||||
case 'video':
|
case 'video':
|
||||||
$asResult = array();
|
$asResult = array();
|
||||||
|
|||||||
@@ -756,7 +756,7 @@ function addMediaMarkers(aoMedias) {
|
|||||||
var oMarker = L.marker(L.latLng(oMedia.latitude, oMedia.longitude), {
|
var oMarker = L.marker(L.latLng(oMedia.latitude, oMedia.longitude), {
|
||||||
id: oMedia.id_media,
|
id: oMedia.id_media,
|
||||||
riseOnHover: true,
|
riseOnHover: true,
|
||||||
icon: getDivIcon(oMedia.subtype+' fa-rotate-270')
|
icon: getDivIcon(oMedia.subtype)
|
||||||
}).addTo(self.tmp('map'));
|
}).addTo(self.tmp('map'));
|
||||||
|
|
||||||
//Tooltip
|
//Tooltip
|
||||||
@@ -777,6 +777,13 @@ function addMediaMarkers(aoMedias) {
|
|||||||
.append(oSpot.lang('local_time', getRelativeTime(oMedia.formatted_time_local, oMedia.day_offset))));
|
.append(oSpot.lang('local_time', getRelativeTime(oMedia.formatted_time_local, oMedia.day_offset))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Tooltip: Altitude
|
||||||
|
if(oMedia.altitude) {
|
||||||
|
$Tooltip.append($('<p>', {'class':'altitude'})
|
||||||
|
.addIcon('fa-altitude fa-fw fa-lg', true)
|
||||||
|
.append(oMedia.altitude+'m'));
|
||||||
|
}
|
||||||
|
|
||||||
$Tooltip.data('medias', [oMedia]);
|
$Tooltip.data('medias', [oMedia]);
|
||||||
oSpot.tmp(['marker-media-tooltips', oMedia.id_media], $Tooltip);
|
oSpot.tmp(['marker-media-tooltips', oMedia.id_media], $Tooltip);
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
## Dependencies
|
## Dependencies
|
||||||
* php-mbstring
|
* php-mbstring
|
||||||
* php-imagick
|
* php-imagick
|
||||||
|
* php-gd
|
||||||
* php-mysql
|
* php-mysql
|
||||||
* php-exif
|
* php-exif
|
||||||
* ffprobe & ffmpeg
|
* ffprobe & ffmpeg
|
||||||
@@ -27,4 +28,4 @@
|
|||||||
* Use WMTS servers directly when not using Geo Caching Server
|
* Use WMTS servers directly when not using Geo Caching Server
|
||||||
* Allow HEIF picture format
|
* Allow HEIF picture format
|
||||||
* Vector tiles support (https://www.arcgis.com/home/item.html?id=7dc6cea0b1764a1f9af2e679f642f0f5) + Use of GL library. Use Mapbox GL JS / Maplibre GL JS / ESRI-Leaflet-vector?
|
* Vector tiles support (https://www.arcgis.com/home/item.html?id=7dc6cea0b1764a1f9af2e679f642f0f5) + Use of GL library. Use Mapbox GL JS / Maplibre GL JS / ESRI-Leaflet-vector?
|
||||||
* Fix .MOV playback on firefox
|
* Fix .MOV playback on windows firefox
|
||||||
@@ -88,6 +88,7 @@ $fa-css-prefix: fa;
|
|||||||
.#{$fa-css-prefix}-message-in:before { content: fa-content($fa-var-shoe-prints); }
|
.#{$fa-css-prefix}-message-in:before { content: fa-content($fa-var-shoe-prints); }
|
||||||
.#{$fa-css-prefix}-time:before { content: fa-content($fa-var-clock); }
|
.#{$fa-css-prefix}-time:before { content: fa-content($fa-var-clock); }
|
||||||
.#{$fa-css-prefix}-coords:before { content: fa-content($fa-var-compass); }
|
.#{$fa-css-prefix}-coords:before { content: fa-content($fa-var-compass); }
|
||||||
|
.#{$fa-css-prefix}-altitude:before { content: fa-content($fa-var-mountain); }
|
||||||
.#{$fa-css-prefix}-drill-video:before { content: fa-content($fa-var-play-circle); }
|
.#{$fa-css-prefix}-drill-video:before { content: fa-content($fa-var-play-circle); }
|
||||||
.#{$fa-css-prefix}-drill-image:before { content: fa-content($fa-var-search); }
|
.#{$fa-css-prefix}-drill-image:before { content: fa-content($fa-var-search); }
|
||||||
.#{$fa-css-prefix}-drill-message:before { content: fa-content($fa-var-search-location); }
|
.#{$fa-css-prefix}-drill-message:before { content: fa-content($fa-var-search-location); }
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user