]> git.openstreetmap.org Git - nominatim.git/blobdiff - website/search.php
Only use placex that are fully indexed for reverse geocoding
[nominatim.git] / website / search.php
index 3655b5c3408a22ee2c68eec4cf274cc94e2e44ef..3b0d6ffba80051fc4e5484a3afa6743657fe18fd 100755 (executable)
                        $sNearPointSQL = false;
                        if (isset($_GET['nearlat']) && isset($_GET['nearlon']))
                        {
-                               $sNearPointSQL = "ST_SetSRID(ST_Point(".(float)$_GET['nearlon'].",".$_GET['nearlat']."),4326)";
+                               $sNearPointSQL = "ST_SetSRID(ST_Point(".(float)$_GET['nearlon'].",".(float)$_GET['nearlat']."),4326)";
                                $aSearches[0]['fLat'] = (float)$_GET['nearlat'];
                                $aSearches[0]['fLon'] = (float)$_GET['nearlon'];
                                $aSearches[0]['fRadius'] = 0.1;
                {
                        if (isset($_GET['nearlat']) && trim($_GET['nearlat'])!=='' && isset($_GET['nearlon']) && trim($_GET['nearlon']) !== '')
                        {
-                               $iPlaceID = geocodeReverse($_GET['nearlat'], $_GET['nearlon']);
+                               $iPlaceID = geocodeReverse((float)$_GET['nearlat'], (float)$_GET['nearlon']);
 
                                if ($iPlaceID)
                                {