X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/0c714f12b4137017e842a10cda0f47839a84dfb9..73fdf5fae2755ba8c0170ff4b7ebce0aab5c08a4:/lib/template/search-json.php diff --git a/lib/template/search-json.php b/lib/template/search-json.php index 4eed52ae..45272d35 100644 --- a/lib/template/search-json.php +++ b/lib/template/search-json.php @@ -4,7 +4,7 @@ { $aPlace = array( 'place_id'=>$aPointDetails['place_id'], - 'licence'=>"Data Copyright OpenStreetMap Contributors, Some Rights Reserved. CC-BY-SA 2.0.", + 'licence'=>"Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright", ); $sOSMType = ($aPointDetails['osm_type'] == 'N'?'node':($aPointDetails['osm_type'] == 'W'?'way':($aPointDetails['osm_type'] == 'R'?'relation':''))); @@ -39,7 +39,7 @@ $aPlace['class'] = $aPointDetails['class']; $aPlace['type'] = $aPointDetails['type']; - if ($aPointDetails['icon']) + if (isset($aPointDetails['icon']) && $aPointDetails['icon']) { $aPlace['icon'] = $aPointDetails['icon']; } @@ -49,6 +49,26 @@ $aPlace['address'] = $aPointDetails['address']; } + if (isset($aResult['asgeojson'])) + { + $aPlace['geojson'] = json_decode($aResult['asgeojson']); + } + + if (isset($aResult['assvg'])) + { + $aPlace['svg'] = $aResult['assvg']; + } + + if (isset($aResult['astext'])) + { + $aPlace['geotext'] = $aResult['astext']; + } + + if (isset($aResult['askml'])) + { + $aPlace['geokml'] = $aResult['askml']; + } + $aFilteredPlaces[] = $aPlace; }