+ echo "</div>\n";
+ }
+ echo "</div>\n";
+
+ if ($aLinkedLines)
+ {
+ echo "<h2>Linked Places</h2>\n";
+ 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">'.$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>';
+ if (isset($aAddressLine['rank_search_label'])) 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>\n";
+ }
+ echo "</div>\n";
+ }
+
+ if ($aPlaceSearchNameKeywords)
+ {
+ echo '<h2>Name Keywords</h2>';
+ foreach($aPlaceSearchNameKeywords as $aRow)
+ {
+ echo '<div>'.$aRow['word_token']."</div>\n";
+ }
+ }
+
+ if ($aPlaceSearchAddressKeywords)
+ {
+ echo '<h2>Address Keywords</h2>';
+ foreach($aPlaceSearchAddressKeywords as $aRow)
+ {
+ echo '<div>'.($aRow['word_token'][0]==' '?'*':'').$aRow['word_token'].'('.$aRow['word_id'].')'."</div>\n";
+ }