]> git.openstreetmap.org Git - nominatim.git/commitdiff
fix missing number conversion for coordinates
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 6 May 2013 19:19:12 +0000 (21:19 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 6 May 2013 19:19:12 +0000 (21:19 +0200)
website/search.php

index 3655b5c3408a22ee2c68eec4cf274cc94e2e44ef..816b248cb011a6a793dee93e6d782587e45ec313 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)";
+                               echo '<br><b>--'.$sNearPointSQL.'--</b><br>';
                                $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)
                                {