X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/0c714f12b4137017e842a10cda0f47839a84dfb9..932d945b7f897fd18be7d4c2fac3eda3915aa296:/lib/template/search-jsonv2.php?ds=sidebyside diff --git a/lib/template/search-jsonv2.php b/lib/template/search-jsonv2.php index 57c162ca..89479dfb 100644 --- a/lib/template/search-jsonv2.php +++ b/lib/template/search-jsonv2.php @@ -36,6 +36,7 @@ $aPlace['lat'] = $aPointDetails['lat']; $aPlace['lon'] = $aPointDetails['lon']; $aPlace['display_name'] = $aPointDetails['name']; + $aPlace['place_rank'] = $aResult['rank_search']; $aPlace['category'] = $aPointDetails['class']; $aPlace['type'] = $aPointDetails['type']; @@ -44,7 +45,7 @@ $aPlace['icon'] = $aPointDetails['icon']; } - if (isset($aPointDetails['address'])) + if (isset($aPointDetails['address']) && sizeof($aPointDetails['address'])>0) { $aPlace['address'] = $aPointDetails['address']; }