From bc22df9057198018f9cc490d0e3e013692f52b90 Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 16 Mar 2015 22:06:03 -0700 Subject: display a map for photos if allowed. Note: there is a bug in that if the map div starts with display:none one needs to reload the frame or zoom in or they end up at minimum resolution. Still trying to sort this out. --- mod/photos.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mod/photos.php') diff --git a/mod/photos.php b/mod/photos.php index 58a38f3f3..503a113dc 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -843,6 +843,8 @@ function photos_content(&$a) { dbesc($datum) ); + $map = null; + if($linked_items) { xchan_query($linked_items); @@ -882,6 +884,10 @@ function photos_content(&$a) { intval(local_channel()) ); } + + if($link_item['coord']) { + $map = generate_map($link_item['coord']); + } } // logger('mod_photo: link_item' . print_r($link_item,true)); @@ -1115,6 +1121,8 @@ function photos_content(&$a) { '$tags' => $tags, 'responses' => $responses, '$edit' => $edit, + '$map' => $map, + '$map_text' => t('Map'), '$likebuttons' => $likebuttons, '$like' => $like_e, '$dislike' => $dislike_e, -- cgit v1.2.3