X-Git-Url: https://git.mxchange.org/?p=friendica-addons.git;a=blobdiff_plain;f=openstreetmap%2Fopenstreetmap.php;fp=openstreetmap%2Fopenstreetmap.php;h=974be0a0a0c651488cb486526d324157f3d2f9a3;hp=bfe960fad5e347fcec2b0c3595a977919f78019e;hb=dbe8118e406510d85404d9577f83d68782cfe2a0;hpb=39dd3dffe07efd69fa1ac6d0bd243c7fc0e3a66f diff --git a/openstreetmap/openstreetmap.php b/openstreetmap/openstreetmap.php index bfe960fa..974be0a0 100644 --- a/openstreetmap/openstreetmap.php +++ b/openstreetmap/openstreetmap.php @@ -42,7 +42,8 @@ function openstreetmap_uninstall() logger("removed openstreetmap"); } -function openstreetmap_alterheader($a, &$navHtml) { +function openstreetmap_alterheader($a, &$navHtml) +{ $addScriptTag = '' . "\r\n"; $a->page['htmlhead'] .= $addScriptTag; } @@ -52,7 +53,7 @@ function openstreetmap_alterheader($a, &$navHtml) { * * If an item has coordinates add link to a tile map server, e.g. openstreetmap.org. * If an item has a location open it with the help of OSM's Nominatim reverse geocode search. - * + * * @param mixed $a * @param array& $item */ @@ -60,6 +61,7 @@ function openstreetmap_location($a, &$item) { if (!(strlen($item['location']) || strlen($item['coord']))) { return; + } /* * Get the configuration variables from the config. @@ -92,13 +94,15 @@ function openstreetmap_location($a, &$item) } } - if ($target == "") + if ($target == "") { $target = $nomserver.'?q='.urlencode($item['location']); + } - if ($item['location'] != "") + if ($item['location'] != "") { $title = $item['location']; - else + } else { $title = $item['coord']; + } $item['html'] = ''.$title.''; } @@ -212,5 +216,3 @@ function openstreetmap_addon_admin_post(&$a) info(L10n::t('Settings updated.') . EOL); } - -