From: Sarah Hoffmann Date: Sat, 11 Jun 2016 21:27:21 +0000 (+0200) Subject: remove now unused bAsPoints in reverse API X-Git-Tag: v3.0.0~159^2~7 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/76b9eb809815f0cc472bb2c8a8e6b613a4973e24 remove now unused bAsPoints in reverse API --- diff --git a/lib/template/address-json.php b/lib/template/address-json.php index 6254357a..38db01c8 100644 --- a/lib/template/address-json.php +++ b/lib/template/address-json.php @@ -29,11 +29,6 @@ if (isset($aPlace['aBoundingBox'])) { $aFilteredPlaces['boundingbox'] = $aPlace['aBoundingBox']; - - if (isset($aPlace['aPolyPoints']) && $bAsPoints) - { - $aFilteredPlaces['polygonpoints'] = $aPlace['aPolyPoints']; - } } if (isset($aPlace['asgeojson'])) diff --git a/lib/template/address-jsonv2.php b/lib/template/address-jsonv2.php index 64c871c1..2cef5e31 100644 --- a/lib/template/address-jsonv2.php +++ b/lib/template/address-jsonv2.php @@ -41,11 +41,6 @@ if (isset($aPlace['aBoundingBox'])) { $aFilteredPlaces['boundingbox'] = $aPlace['aBoundingBox']; - - if (isset($aPlace['aPolyPoints']) && $bAsPoints) - { - $aFilteredPlaces['polygonpoints'] = $aPlace['aPolyPoints']; - } } if (isset($aPlace['asgeojson'])) diff --git a/lib/template/address-xml.php b/lib/template/address-xml.php index a3369d34..5e74846e 100644 --- a/lib/template/address-xml.php +++ b/lib/template/address-xml.php @@ -33,13 +33,6 @@ echo ' boundingbox="'; echo join(',', $aPlace['aBoundingBox']); echo '"'; - - if ($bAsPoints && isset($aPlace['aPolyPoints'])) - { - echo ' polygonpoints=\''; - echo json_encode($aPlace['aPolyPoints']); - echo '\''; - } } if (isset($aPlace['asgeojson'])) diff --git a/website/reverse.php b/website/reverse.php index 75eb2677..430d9e39 100755 --- a/website/reverse.php +++ b/website/reverse.php @@ -20,13 +20,12 @@ } - $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) { @@ -70,12 +69,12 @@ $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);