From f2a0ea7b7df1ef33f18e553628b9b3af76a3d9f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Fri, 31 Mar 2017 13:32:20 +0200 Subject: [PATCH] Show OSM iframe if image is geotagged If the spatialhelper and the geophp plugins are available, then show a iframe from open street map with the location of the photo. SPR-814 --- detail.php | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/detail.php b/detail.php index 6a1fd9e..70ddd7c 100755 --- a/detail.php +++ b/detail.php @@ -169,7 +169,30 @@ header('X-UA-Compatible: IE=edge,chrome=1');

- + getCoordsFromExif($IMG); + if ($point) { + $long = $point->getX(); + $lat = $point->getY(); + $latShort = round($lat,3); + $longShort = round($long,3); + + $hrefOSM = "https://www.openstreetmap.org/?mlat=$lat&mlon=$long#map=18/$lat/$long"; + $srcOSM = 'https://www.openstreetmap.org/export/embed.html?bbox='.($long-0.004).','.($lat-0.002).','.($long+0.004).','.($lat+0.002).'&layer=mapnik&marker='.$lat.','.$long; + echo '
'; + echo '
OSM:
'; + echo '
View Larger Map'; + echo '
'; + echo '
'; + } + } + ?>