From 80df4d3b560f5b1fd550dcf8cdc09a992b69fee0 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Thu, 28 May 2015 21:25:55 +0200 Subject: [PATCH] fix parameter name Fixes trac ticket 5319. --- lib/Geocode.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Geocode.php b/lib/Geocode.php index bb067046..4ca832dc 100644 --- a/lib/Geocode.php +++ b/lib/Geocode.php @@ -1600,7 +1600,7 @@ if (isset($aClassType[$aResult['class'].':'.$aResult['type'].':'.$aResult['admin_level']]['defdiameter']) && $aClassType[$aResult['class'].':'.$aResult['type'].':'.$aResult['admin_level']]['defdiameter']) { - $fDiameter = $aClassType[$aResult['class'].':'.$aResult['type'].':'.$aResult['admin_level']]['defzoom']; + $fDiameter = $aClassType[$aResult['class'].':'.$aResult['type'].':'.$aResult['admin_level']]['defdiameter']; } elseif (isset($aClassType[$aResult['class'].':'.$aResult['type']]['defdiameter']) && $aClassType[$aResult['class'].':'.$aResult['type']]['defdiameter']) @@ -1662,7 +1662,7 @@ } elseif (preg_match('#POINT\\((-?[0-9.]+) (-?[0-9.]+)\\)#',$aPointPolygon['astext'],$aMatch)) { - $iSteps = ($fRadius * 40000)^2; + $iSteps = max(8, min(100, ($fRadius * 40000)^2)); $fStepSize = (2*pi())/$iSteps; $aPolyPoints = array(); for($f = 0; $f < 2*pi(); $f += $fStepSize) -- 2.39.5