X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8677da2a72bb54a86e91ed79e4adb943fa9ef40b..966ba4fe678284ff9cc6ac5f1385b78dc0b74675:/lib-php/template/search-geocodejson.php 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',