]> git.openstreetmap.org Git - nominatim.git/blob - lib-php/website/reverse-only-search.php
Merge pull request #2856 from t-tomek/patch-1
[nominatim.git] / lib-php / website / reverse-only-search.php
1 <?php
2 /**
3  * SPDX-License-Identifier: GPL-2.0-only
4  *
5  * This file is part of Nominatim. (https://nominatim.org)
6  *
7  * Copyright (C) 2022 by the Nominatim developer community.
8  * For a full list of authors see the git log.
9  */
10
11 require_once(CONST_LibDir.'/init-website.php');
12 require_once(CONST_LibDir.'/ParameterParser.php');
13
14 $oParams = new Nominatim\ParameterParser();
15
16 // Format for output
17 $sOutputFormat = $oParams->getSet('format', array('xml', 'json', 'jsonv2', 'geojson', 'geocodejson'), 'jsonv2');
18 set_exception_handler_by_format($sOutputFormat);
19
20 throw new Exception('Reverse-only import does not support forward searching.', 404);