search/reverse/lookup with geojson,geocodejson output

This commit is contained in:
Marc Tobias Metten
2018-03-18 01:49:26 +01:00
committed by marc tobias
parent 1d0da944a6
commit 7a964efb3a
17 changed files with 455 additions and 23 deletions

View File

@@ -11,7 +11,7 @@ ini_set('memory_limit', '200M');
$oParams = new Nominatim\ParameterParser();
// Format for output
$sOutputFormat = $oParams->getSet('format', array('xml', 'json'), 'xml');
$sOutputFormat = $oParams->getSet('format', array('xml', 'json', 'geojson'), 'xml');
// Preferred language
$aLangPrefOrder = $oParams->getPreferredLanguages();
@@ -66,4 +66,5 @@ $bShowPolygons = '';
$aExcludePlaceIDs = array();
$sMoreURL = '';
include(CONST_BasePath.'/lib/template/search-'.$sOutputFormat.'.php');
$sOutputTemplate = ($sOutputFormat == 'jsonv2') ? 'json' : $sOutputFormat;
include(CONST_BasePath.'/lib/template/search-'.$sOutputTemplate.'.php');