forked from vincent3569/zpBootstrap
-
Notifications
You must be signed in to change notification settings - Fork 1
/
inc_print_osm.php
29 lines (27 loc) · 827 Bytes
/
inc_print_osm.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
$hasAlbumGeodata = false;
$album = $_zp_current_album;
$images = $album->getImages();
foreach ($images as $an_image) {
$image = Image::newImage($album, $an_image);
$exif = $image->getMetaData();
if ((!empty($exif['EXIFGPSLatitude'])) && (!empty($exif['EXIFGPSLongitude']))) {
$hasAlbumGeodata = true; // at least one image has geodata
}
}
// display map only if they are geodata
if ($hasAlbumGeodata == true) {
?>
<div class="osm_panel panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<span class="glyphicon glyphicon-map-marker"></span> <?php echo gettext('Map'); ?>
</h4>
</div>
<div class="panel-body">
<?php openStreetMap::printOpenStreetMap(); ?>
</div>
</div>
<?php
}
?>