';
- $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 _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 ' ' . osmLink($aAddressLine) . " | \n";
+ echo ' ' . (isset($aAddressLine['admin_level']) ? $aAddressLine['admin_level'] : '') . " | \n";
+ echo ' ' . format_distance($aAddressLine['distance'])." | \n";
+ echo ' ' . detailsLink($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 '