mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
remove now unused bAsPoints in reverse API
This commit is contained in:
@@ -29,11 +29,6 @@
|
|||||||
if (isset($aPlace['aBoundingBox']))
|
if (isset($aPlace['aBoundingBox']))
|
||||||
{
|
{
|
||||||
$aFilteredPlaces['boundingbox'] = $aPlace['aBoundingBox'];
|
$aFilteredPlaces['boundingbox'] = $aPlace['aBoundingBox'];
|
||||||
|
|
||||||
if (isset($aPlace['aPolyPoints']) && $bAsPoints)
|
|
||||||
{
|
|
||||||
$aFilteredPlaces['polygonpoints'] = $aPlace['aPolyPoints'];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($aPlace['asgeojson']))
|
if (isset($aPlace['asgeojson']))
|
||||||
|
|||||||
@@ -41,11 +41,6 @@
|
|||||||
if (isset($aPlace['aBoundingBox']))
|
if (isset($aPlace['aBoundingBox']))
|
||||||
{
|
{
|
||||||
$aFilteredPlaces['boundingbox'] = $aPlace['aBoundingBox'];
|
$aFilteredPlaces['boundingbox'] = $aPlace['aBoundingBox'];
|
||||||
|
|
||||||
if (isset($aPlace['aPolyPoints']) && $bAsPoints)
|
|
||||||
{
|
|
||||||
$aFilteredPlaces['polygonpoints'] = $aPlace['aPolyPoints'];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($aPlace['asgeojson']))
|
if (isset($aPlace['asgeojson']))
|
||||||
|
|||||||
@@ -33,13 +33,6 @@
|
|||||||
echo ' boundingbox="';
|
echo ' boundingbox="';
|
||||||
echo join(',', $aPlace['aBoundingBox']);
|
echo join(',', $aPlace['aBoundingBox']);
|
||||||
echo '"';
|
echo '"';
|
||||||
|
|
||||||
if ($bAsPoints && isset($aPlace['aPolyPoints']))
|
|
||||||
{
|
|
||||||
echo ' polygonpoints=\'';
|
|
||||||
echo json_encode($aPlace['aPolyPoints']);
|
|
||||||
echo '\'';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($aPlace['asgeojson']))
|
if (isset($aPlace['asgeojson']))
|
||||||
|
|||||||
@@ -20,13 +20,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$bAsPoints = false;
|
|
||||||
$bAsGeoJSON = getParamBool('polygon_geojson');
|
$bAsGeoJSON = getParamBool('polygon_geojson');
|
||||||
$bAsKML = getParamBool('polygon_kml');
|
$bAsKML = getParamBool('polygon_kml');
|
||||||
$bAsSVG = getParamBool('polygon_svg');
|
$bAsSVG = getParamBool('polygon_svg');
|
||||||
$bAsText = getParamBool('polygon_text');
|
$bAsText = getParamBool('polygon_text');
|
||||||
if ((($bAsGeoJSON?1:0) + ($bAsKML?1:0) + ($bAsSVG?1:0)
|
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)
|
if (CONST_PolygonOutput_MaximumTypes)
|
||||||
{
|
{
|
||||||
@@ -70,12 +69,12 @@
|
|||||||
$oReverseGeocode->setLanguagePreference($aLangPrefOrder);
|
$oReverseGeocode->setLanguagePreference($aLangPrefOrder);
|
||||||
|
|
||||||
$oReverseGeocode->setLatLon($fLat, $fLon);
|
$oReverseGeocode->setLatLon($fLat, $fLon);
|
||||||
$oReverseGeocode->setZoom(getParamInt('zoom'));
|
$oReverseGeocode->setZoom(getParamInt('zoom', 18));
|
||||||
|
|
||||||
$aLookup = $oReverseGeocode->lookup();
|
$aLookup = $oReverseGeocode->lookup();
|
||||||
if (CONST_Debug) var_dump($aLookup);
|
if (CONST_Debug) var_dump($aLookup);
|
||||||
}
|
}
|
||||||
else
|
else if ($sOutputFormat != 'html')
|
||||||
{
|
{
|
||||||
userError("Need coordinates or OSM object to lookup.");
|
userError("Need coordinates or OSM object to lookup.");
|
||||||
}
|
}
|
||||||
@@ -90,7 +89,7 @@
|
|||||||
|
|
||||||
$aPlace = $oPlaceLookup->lookupPlace($aLookup);
|
$aPlace = $oPlaceLookup->lookupPlace($aLookup);
|
||||||
|
|
||||||
$oPlaceLookup->setIncludePolygonAsPoints($bAsPoints);
|
$oPlaceLookup->setIncludePolygonAsPoints(false);
|
||||||
$oPlaceLookup->setIncludePolygonAsText($bAsText);
|
$oPlaceLookup->setIncludePolygonAsText($bAsText);
|
||||||
$oPlaceLookup->setIncludePolygonAsGeoJSON($bAsGeoJSON);
|
$oPlaceLookup->setIncludePolygonAsGeoJSON($bAsGeoJSON);
|
||||||
$oPlaceLookup->setIncludePolygonAsKML($bAsKML);
|
$oPlaceLookup->setIncludePolygonAsKML($bAsKML);
|
||||||
|
|||||||
Reference in New Issue
Block a user