X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/b4fec57b6d53f8e8a45c46ff11f13cbcbea1006a..3bcd32ca2006cb2184f290e18f4e054f8aca8bf4:/lib-php/template/search-geocodejson.php diff --git a/lib-php/template/search-geocodejson.php b/lib-php/template/search-geocodejson.php index 336731a2..5439e3cf 100644 --- a/lib-php/template/search-geocodejson.php +++ b/lib-php/template/search-geocodejson.php @@ -1,4 +1,12 @@ $aPointDetails) { @@ -17,8 +25,10 @@ foreach ($aSearchResults as $iResNum => $aPointDetails) { $aPlace['properties']['geocoding']['osm_type'] = $sOSMType; $aPlace['properties']['geocoding']['osm_id'] = $aPointDetails['osm_id']; } + $aPlace['properties']['geocoding']['osm_key'] = $aPointDetails['class']; + $aPlace['properties']['geocoding']['osm_value'] = $aPointDetails['type']; - $aPlace['properties']['geocoding']['type'] = $aPointDetails['type']; + $aPlace['properties']['geocoding']['type'] = addressRankToGeocodeJsonType($aPointDetails['rank_address']); $aPlace['properties']['geocoding']['label'] = $aPointDetails['langaddress'];