';
- $iPrevRank = 1000000;
- $sPrevLocalName = '';
- foreach($aAddressLines as $aAddressLine)
- {
- $sOSMType = ($aAddressLine['osm_type'] == 'N'?'node':($aAddressLine['osm_type'] == 'W'?'way':($aAddressLine['osm_type'] == 'R'?'relation':'')));
-
- echo '
';
- if (!($iPrevRank<=$aAddressLine['rank_address'] || $sPrevLocalName == $aAddressLine['localname']))
+
+ // function hash_to_subtable($aAssociatedList)
+ // {
+ // $sHTML = '
';
+ // foreach($aAssociatedList as $sKey => $sValue)
+ // {
+ // $sHTML = $sHTML . ''.$sKey.' | '.$sValue.' |
'."\n";
+ // }
+ // $sHTML = $sHTML . '
';
+ // return $sHTML;
+ // }
+
+
+ function map_icon($sIcon)
+ {
+ if ($sIcon){
+ echo '
';
+ }
+ }
+
+
+ function _one_row($aAddressLine){
+ $bNotUsed = (isset($aAddressLine['isaddress']) && $aAddressLine['isaddress'] == 'f');
+
+ echo '
'."\n";
+ echo ' '.(trim($aAddressLine['localname'])?$aAddressLine['localname']:'No Name')." | \n";
+ echo ' ' . $aAddressLine['class'].':'.$aAddressLine['type'] . " | \n";
+ echo ' ' . osm_link($aAddressLine) . " | \n";
+ echo ' ' . (isset($aAddressLine['admin_level']) ? $aAddressLine['admin_level'] : '') . " | \n";
+ // echo '' . (isset($aAddressLine['rank_search_label']) ? $aAddressLine['rank_search_label'] : '') ." | \n";
+ // echo ', '.($aAddressLine['fromarea']=='t'?'Polygon':'Point').'';
+ echo ' ' . format_distance($aAddressLine['distance'])." | \n";
+ echo ' ' . nominatim_link($aAddressLine,'details >') . " | \n";
+ echo "
\n";
+ }
+
+ function _one_keyword_row($keyword_token,$word_id){
+ echo "
\n";
+ echo '';
+ // mark partial tokens (those starting with a space) with a star for readability
+ echo ($keyword_token[0]==' '?'*':'');
+ echo $keyword_token;
+ if (isset($word_id))
{
- $iPrevRank = $aAddressLine['rank_address'];
- $sPrevLocalName = $aAddressLine['localname'];
+ echo ' | word id: '.$word_id;
}
- echo ''.(trim($aAddressLine['localname'])?$aAddressLine['localname']:'No Name').'';
- echo ' (';
- echo 'Type: '.$aAddressLine['class'].':'.$aAddressLine['type'].'';
- if ($sOSMType) echo ', '.$sOSMType.' '.$aAddressLine['osm_id'].'';
- echo ', '.$aAddressLine['admin_level'].'';
- echo ', '.$aAddressLine['rank_search_label'].'';
- echo ', '.($aAddressLine['fromarea']=='t'?'Polygon':'Point').'';
- echo ', '.$aAddressLine['distance'].'';
- echo ' GOTO';
- echo ')';
- echo '';
+ echo " |
\n";
}
- echo '