]> git.openstreetmap.org Git - nominatim.git/commitdiff
remove now unused bAsPoints in reverse API
authorSarah Hoffmann <lonvia@denofr.de>
Sat, 11 Jun 2016 21:27:21 +0000 (23:27 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sat, 11 Jun 2016 21:27:21 +0000 (23:27 +0200)
lib/template/address-json.php
lib/template/address-jsonv2.php
lib/template/address-xml.php
website/reverse.php

index 6254357a711b3727498a722b06c61640d04ca308..38db01c8626e2b1b9675583a42ee9bbe664270ba 100644 (file)
                if (isset($aPlace['aBoundingBox']))
                {
                        $aFilteredPlaces['boundingbox'] = $aPlace['aBoundingBox'];
-
-                       if (isset($aPlace['aPolyPoints']) && $bAsPoints)
-                       {
-                               $aFilteredPlaces['polygonpoints'] = $aPlace['aPolyPoints'];
-                       }
                }
 
                if (isset($aPlace['asgeojson']))
index 64c871c10c9d748c057a4df35f30d1bdad0e12bb..2cef5e31ff9dd3340bfd7864af23d2f85badc3cf 100644 (file)
                if (isset($aPlace['aBoundingBox']))
                {
                        $aFilteredPlaces['boundingbox'] = $aPlace['aBoundingBox'];
-
-                       if (isset($aPlace['aPolyPoints']) && $bAsPoints)
-                       {
-                               $aFilteredPlaces['polygonpoints'] = $aPlace['aPolyPoints'];
-                       }
                }
 
                if (isset($aPlace['asgeojson']))
index a3369d34890e3b0a95c3cd897e5bce34155b581d..5e74846e26c5864f496553100c16d2cee96e2c19 100644 (file)
                        echo ' boundingbox="';
                        echo join(',', $aPlace['aBoundingBox']);
                        echo '"';
-
-                       if ($bAsPoints && isset($aPlace['aPolyPoints']))
-                       {
-                               echo ' polygonpoints=\'';
-                               echo json_encode($aPlace['aPolyPoints']);
-                               echo '\'';
-                       }
                }
 
                if (isset($aPlace['asgeojson']))
index 75eb26779550c31da55f6a7e17fb499383e68e1f..430d9e39c2b208bb82ebfcb3d7956cf98808968c 100755 (executable)
        }
 
 
-       $bAsPoints = false;
        $bAsGeoJSON = getParamBool('polygon_geojson');
        $bAsKML = getParamBool('polygon_kml');
        $bAsSVG = getParamBool('polygon_svg');
        $bAsText = getParamBool('polygon_text');
        if ((($bAsGeoJSON?1:0) + ($bAsKML?1:0) + ($bAsSVG?1:0)
-               + ($bAsText?1:0) + ($bAsPoints?1:0)) > CONST_PolygonOutput_MaximumTypes)
+               + ($bAsText?1:0)) > CONST_PolygonOutput_MaximumTypes)
        {
                if (CONST_PolygonOutput_MaximumTypes)
                {
                $oReverseGeocode->setLanguagePreference($aLangPrefOrder);
 
                $oReverseGeocode->setLatLon($fLat, $fLon);
-               $oReverseGeocode->setZoom(getParamInt('zoom'));
+               $oReverseGeocode->setZoom(getParamInt('zoom', 18));
 
                $aLookup = $oReverseGeocode->lookup();
                if (CONST_Debug) var_dump($aLookup);
        }
-       else
+       else if ($sOutputFormat != 'html')
        {
                userError("Need coordinates or OSM object to lookup.");
        }
@@ -90,7 +89,7 @@
 
                $aPlace = $oPlaceLookup->lookupPlace($aLookup);
 
-               $oPlaceLookup->setIncludePolygonAsPoints($bAsPoints);
+               $oPlaceLookup->setIncludePolygonAsPoints(false);
                $oPlaceLookup->setIncludePolygonAsText($bAsText);
                $oPlaceLookup->setIncludePolygonAsGeoJSON($bAsGeoJSON);
                $oPlaceLookup->setIncludePolygonAsKML($bAsKML);