if (isset($aPlace['aBoundingBox']))
{
$aFilteredPlaces['boundingbox'] = $aPlace['aBoundingBox'];
-
- if (isset($aPlace['aPolyPoints']) && $bAsPoints)
- {
- $aFilteredPlaces['polygonpoints'] = $aPlace['aPolyPoints'];
- }
}
if (isset($aPlace['asgeojson']))
if (isset($aPlace['aBoundingBox']))
{
$aFilteredPlaces['boundingbox'] = $aPlace['aBoundingBox'];
-
- if (isset($aPlace['aPolyPoints']) && $bAsPoints)
- {
- $aFilteredPlaces['polygonpoints'] = $aPlace['aPolyPoints'];
- }
}
if (isset($aPlace['asgeojson']))
echo ' boundingbox="';
echo join(',', $aPlace['aBoundingBox']);
echo '"';
-
- if ($bAsPoints && isset($aPlace['aPolyPoints']))
- {
- echo ' polygonpoints=\'';
- echo json_encode($aPlace['aPolyPoints']);
- echo '\'';
- }
}
if (isset($aPlace['asgeojson']))
}
- $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.");
}
$aPlace = $oPlaceLookup->lookupPlace($aLookup);
- $oPlaceLookup->setIncludePolygonAsPoints($bAsPoints);
+ $oPlaceLookup->setIncludePolygonAsPoints(false);
$oPlaceLookup->setIncludePolygonAsText($bAsText);
$oPlaceLookup->setIncludePolygonAsGeoJSON($bAsGeoJSON);
$oPlaceLookup->setIncludePolygonAsKML($bAsKML);