]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/template/details-html.php
Update details.php to show linked places
[nominatim.git] / lib / template / details-html.php
index aa27664b307eed944e45637673a589c788d63b34..c438659b6e7f107854389b37f65a5ed1f2966739 100644 (file)
@@ -142,7 +142,7 @@ if (isset($aPolyPoints))
                if ($sOSMType) echo ', <span class="osm"><span class="label"></span>'.$sOSMType.' <a href="http://www.openstreetmap.org/browse/'.$sOSMType.'/'.$aAddressLine['osm_id'].'">'.$aAddressLine['osm_id'].'</a></span>';
                echo ', <span class="adminlevel">'.$aAddressLine['admin_level'].'</span>';
                echo ', <span class="rankaddress">'.$aAddressLine['rank_search_label'].'</span>';
-               echo ', <span class="area">'.($aAddressLine['fromarea']=='t'?'Polygon':'Point').'</span>';
+//             echo ', <span class="area">'.($aAddressLine['fromarea']=='t'?'Polygon':'Point').'</span>';
                echo ', <span class="distance">'.$aAddressLine['distance'].'</span>';
                echo ' <a href="details.php?place_id='.$aAddressLine['place_id'].'">GOTO</a>';
                echo ')';
@@ -150,6 +150,30 @@ if (isset($aPolyPoints))
        }
        echo '</div>';
 
+       if ($aLinkedLines)
+       {
+               echo '<h2>Linked Places</h2>';
+               echo '<div class=\"linked\">';
+               foreach($aLinkedLines as $aAddressLine)
+               {       
+                       $sOSMType = ($aAddressLine['osm_type'] == 'N'?'node':($aAddressLine['osm_type'] == 'W'?'way':($aAddressLine['osm_type'] == 'R'?'relation':'')));
+
+                       echo '<div class="line">';
+                       echo '<span class="name">'.(trim($aAddressLine['localname'])?$aAddressLine['localname']:'<span class="noname">No Name</span>').'</span>';
+                       echo ' (';
+                       echo '<span class="type"><span class="label">Type: </span>'.$aAddressLine['class'].':'.$aAddressLine['type'].'</span>';
+                       if ($sOSMType) echo ', <span class="osm"><span class="label"></span>'.$sOSMType.' <a href="http://www.openstreetmap.org/browse/'.$sOSMType.'/'.$aAddressLine['osm_id'].'">'.$aAddressLine['osm_id'].'</a></span>';
+                       echo ', <span class="adminlevel">'.$aAddressLine['admin_level'].'</span>';
+                       echo ', <span class="rankaddress">'.$aAddressLine['rank_search_label'].'</span>';
+//                     echo ', <span class="area">'.($aAddressLine['fromarea']=='t'?'Polygon':'Point').'</span>';
+                       echo ', <span class="distance">'.$aAddressLine['distance'].'</span>';
+                       echo ' <a href="details.php?place_id='.$aAddressLine['place_id'].'">GOTO</a>';
+                       echo ')';
+                       echo '</div>';
+               }
+               echo '</div>';
+       }
+
        if ($aPlaceSearchNameKeywords)
        {
                echo '<h2>Name Keywords</h2>';