X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/ecee3828b38dbcf1712c1a1a3ccee1c3bc774f78..e67a6dc32117bd1bd14e2d0cfbe978f74300e85f:/lib/NearPoint.php diff --git a/lib/NearPoint.php b/lib/NearPoint.php index e8d595cc..4f0531d9 100644 --- a/lib/NearPoint.php +++ b/lib/NearPoint.php @@ -133,8 +133,8 @@ class NearPoint $sFound = $aData[0]; $fQueryLat = ($aData[2]=='N'?1:-1) * ($aData[1]); $fQueryLon = ($aData[4]=='E'?1:-1) * ($aData[3]); - } elseif (preg_match('/(\\[|^|\\b)(-?[0-9]+[0-9]*\\.[0-9]+)[, ]+(-?[0-9]+[0-9]*\\.[0-9]+)(\\]|$|\\b)/', $sQuery, $aData)) { - /* 1 2 3 4 + } elseif (preg_match('/(\\[|^|\\b)?(-?[0-9]+[0-9]*\\.[0-9]+)[, ]+(-?[0-9]+[0-9]*\\.[0-9]+)(\\]|$|\\b)/', $sQuery, $aData)) { + /* 1 2 3 4 * degrees decimal * 12.34, 56.78 * [12.456,-78.90]