add tests for geocodejson and fix syntax errors

This commit is contained in:
Sarah Hoffmann
2018-07-12 22:00:18 +02:00
parent 25baaf530d
commit be58b929f2
5 changed files with 17 additions and 3 deletions

View File

@@ -76,6 +76,6 @@ if (empty($aPlace)) {
'licence' => 'ODbL',
'query' => $sQuery
),
'features' => $aFilteredPlaces
'features' => [$aFilteredPlaces]
));
}

View File

@@ -9,8 +9,8 @@ foreach ($aSearchResults as $iResNum => $aPointDetails) {
)
);
if (isset($aPlace['place_id'])) $aPlace['properties']['geocoding']['place_id'] = $aPointDetails['place_id'];
$sOSMType = formatOSMType($aPlace['osm_type']);
if (isset($aPointDetails['place_id'])) $aPlace['properties']['geocoding']['place_id'] = $aPointDetails['place_id'];
$sOSMType = formatOSMType($aPointDetails['osm_type']);
if ($sOSMType) {
$aPlace['properties']['geocoding']['osm_type'] = $sOSMType;
$aPlace['properties']['geocoding']['osm_id'] = $aPointDetails['osm_id'];