mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-15 02:47:59 +00:00
feat: Added reverse-only-search validation
This commit is contained in:
12
lib-php/website/reverse-only-search.php
Normal file
12
lib-php/website/reverse-only-search.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
require_once(CONST_LibDir.'/init-website.php');
|
||||
require_once(CONST_LibDir.'/ParameterParser.php');
|
||||
|
||||
$oParams = new Nominatim\ParameterParser();
|
||||
|
||||
// Format for output
|
||||
$sOutputFormat = $oParams->getSet('format', array('xml', 'json', 'jsonv2', 'geojson', 'geocodejson'), 'jsonv2');
|
||||
set_exception_handler_by_format($sOutputFormat);
|
||||
|
||||
throw new Exception('Reverse-only import does not support forward searching.', 404);
|
||||
Reference in New Issue
Block a user