]> git.openstreetmap.org Git - nominatim.git/commitdiff
Use correct value for html ploygons
authorBrian Quinion <brian.quinion@mapquest.com>
Wed, 28 Aug 2013 12:42:05 +0000 (13:42 +0100)
committerBrian Quinion <brian.quinion@mapquest.com>
Fri, 6 Sep 2013 08:47:45 +0000 (09:47 +0100)
website/search.php

index 98c878ea45f8e5a2a8d1277d3eaa8b1fb6030a53..11c98c6962b11ef2eb11557bf53dd842ef4132ed 100755 (executable)
@@ -37,7 +37,7 @@
        // Show / use polygons
        if ($sOutputFormat == 'html')
        {
-               if (isset($_GET['polygon'])) $oGeocode->setIncludePolygonAsPoints((bool)$_GET['polygon']);
+               if (isset($_GET['polygon'])) $oGeocode->setIncludePolygonAsText((bool)$_GET['polygon']);
        }
        else
        {
@@ -63,6 +63,7 @@
                        }
                        exit;
                }
+               $oGeocode->setIncludePolygonAsText($bAsPoints);
                $oGeocode->setIncludePolygonAsText($bAsText);
                $oGeocode->setIncludePolygonAsGeoJSON($bAsGeoJSON);
                $oGeocode->setIncludePolygonAsKML($bAsKML);
 
        $sMoreURL = CONST_Website_BaseURL.'search?format='.urlencode($sOutputFormat).'&exclude_place_ids='.join(',',$oGeocode->getExcludedPlaceIDs());
        if (isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])) $sMoreURL .= '&accept-language='.$_SERVER["HTTP_ACCEPT_LANGUAGE"];
-       if ($oGeocode->getIncludePolygonAsPoints()) $sMoreURL .= '&polygon=1';
+       if (isset($_GET['polygon']) && isset($_GET['polygon'])) $sMoreURL .= '&polygon=1';
        if ($oGeocode->getIncludeAddressDetails()) $sMoreURL .= '&addressdetails=1';
        if (isset($_GET['viewbox']) && $_GET['viewbox']) $sMoreURL .= '&viewbox='.urlencode($_GET['viewbox']);
        if (isset($_GET['nearlat']) && isset($_GET['nearlon'])) $sMoreURL .= '&nearlat='.(float)$_GET['nearlat'].'&nearlon='.(float)$_GET['nearlon'];