X-Git-Url: https://git.mxchange.org/?p=friendica-addons.git;a=blobdiff_plain;f=openstreetmap%2Fopenstreetmap.php;fp=openstreetmap%2Fopenstreetmap.php;h=bfe960fad5e347fcec2b0c3595a977919f78019e;hp=974be0a0a0c651488cb486526d324157f3d2f9a3;hb=39dd3dffe07efd69fa1ac6d0bd243c7fc0e3a66f;hpb=67c1273e08511bba6d5108e66305783deaca752f diff --git a/openstreetmap/openstreetmap.php b/openstreetmap/openstreetmap.php index 974be0a0..bfe960fa 100644 --- a/openstreetmap/openstreetmap.php +++ b/openstreetmap/openstreetmap.php @@ -42,8 +42,7 @@ function openstreetmap_uninstall() logger("removed openstreetmap"); } -function openstreetmap_alterheader($a, &$navHtml) -{ +function openstreetmap_alterheader($a, &$navHtml) { $addScriptTag = '' . "\r\n"; $a->page['htmlhead'] .= $addScriptTag; } @@ -53,7 +52,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 */ @@ -61,7 +60,6 @@ function openstreetmap_location($a, &$item) { if (!(strlen($item['location']) || strlen($item['coord']))) { return; - } /* * Get the configuration variables from the config. @@ -94,15 +92,13 @@ 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.''; } @@ -216,3 +212,5 @@ function openstreetmap_addon_admin_post(&$a) info(L10n::t('Settings updated.') . EOL); } + +