]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-php/template/search-geocodejson.php
geocodejson: add osm_key and osm_value fields
[nominatim.git] / lib-php / template / search-geocodejson.php
index ffdda6c6b64a3a68d1841a5b76d29d8929d6df8d..5439e3cfe532e61140a3293701d8a1a5c6517926 100644 (file)
@@ -25,6 +25,8 @@ 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'] = addressRankToGeocodeJsonType($aPointDetails['rank_address']);