X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8677da2a72bb54a86e91ed79e4adb943fa9ef40b..c8873d34af083a7cb117214c6d852ef78e05acb7:/lib-php/template/search-geocodejson.php?ds=inline diff --git a/lib-php/template/search-geocodejson.php b/lib-php/template/search-geocodejson.php index ffdda6c6..bba41a0d 100644 --- a/lib-php/template/search-geocodejson.php +++ b/lib-php/template/search-geocodejson.php @@ -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']); @@ -44,7 +46,7 @@ foreach ($aSearchResults as $iResNum => $aPointDetails) { } if (isset($aPointDetails['asgeojson'])) { - $aPlace['geometry'] = json_decode($aPointDetails['asgeojson']); + $aPlace['geometry'] = json_decode($aPointDetails['asgeojson'], true); } else { $aPlace['geometry'] = array( 'type' => 'Point',