X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/c3788d765ed4e7ddf00794085af757714bc102cf..151b3c40211dd090dfd5998f2c700319d6de0cf6:/lib-php/template/address-geocodejson.php?ds=inline diff --git a/lib-php/template/address-geocodejson.php b/lib-php/template/address-geocodejson.php index 584e27cf..d54aef40 100644 --- a/lib-php/template/address-geocodejson.php +++ b/lib-php/template/address-geocodejson.php @@ -36,7 +36,7 @@ if (empty($aPlace)) { $aFilteredPlaces['properties']['geocoding']['osm_id'] = $aPlace['osm_id']; } - $aFilteredPlaces['properties']['geocoding']['type'] = $aPlace['type']; + $aFilteredPlaces['properties']['geocoding']['type'] = addressRankToGeocodeJsonType($aPlace['rank_address']); $aFilteredPlaces['properties']['geocoding']['accuracy'] = (int) $fDistance; @@ -56,7 +56,7 @@ if (empty($aPlace)) { } if (isset($aPlace['asgeojson'])) { - $aFilteredPlaces['geometry'] = json_decode($aPlace['asgeojson']); + $aFilteredPlaces['geometry'] = json_decode($aPlace['asgeojson'], true); } else { $aFilteredPlaces['geometry'] = array( 'type' => 'Point',