From: Sarah Hoffmann Date: Mon, 3 Mar 2014 20:48:17 +0000 (+0100) Subject: forgot the actual query script X-Git-Tag: v2.3.0~66 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/e42ff1935f05c6e0eb5db77d264e7c923186deb2 forgot the actual query script --- diff --git a/lib/init-cmd.php b/lib/init-cmd.php index c36f0e57..e6de0522 100644 --- a/lib/init-cmd.php +++ b/lib/init-cmd.php @@ -1,7 +1,6 @@ setLanguagePreference(getPreferredLanguages($aCMDResult['accept-language'])); + else + $oGeocode->setLanguagePreference(getPreferredLanguages()); + $oGeocode->loadParamArray($aCMDResult); + $oGeocode->setQuery($aCMDResult['search']); + + $aSearchResults = $oGeocode->lookup(); + + if (version_compare(phpversion(), "5.4.0", '<')) + echo json_encode($aSearchResults); + else + echo json_encode($aSearchResults, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)."\n"; + } + else + { + showUsage($aCMDOptions, true); + } + + +