[mapguide-commits] r4772 - trunk/MgDev/Web/src/viewerfiles
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Thu Apr 8 22:06:26 EDT 2010
Author: liuar
Date: 2010-04-08 22:06:25 -0400 (Thu, 08 Apr 2010)
New Revision: 4772
Modified:
trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ
Log:
Fixed ticket #1307 FDO exception thrown up if clicking but no draging with SelectRadius
There will be a CURVEPOLYGON created when draging or clicking if the user chooses SelectRadius.
For draging, a valid CURVEPOLYGON will be create by the center and radius.
But for clicking, the radius will be 0 and the created CURVEPOLYGON will like:
CURVEPOLYGON ((7.629521563329069 19.93939991157145 (CIRCULARARCSEGMENT (9.193306642292184 18.375614832608335, 10.757091721255298 19.93939991157145), CIRCULARARCSEGMENT (9.193306642292184 21.503184990534564, 7.629521563329069 19.93939991157145))))
which is not a valid CURVEPOLYGON. That's why there's an exception thrown up. IE has the same problem but the exception is not displayed to user.
To resolve this problem, we can try to validate the value of the radius before creating the CURVEPOLYGON. If the value equals to 0, just return.
Modified: trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ 2010-04-08 20:43:13 UTC (rev 4771)
+++ trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ 2010-04-09 02:06:25 UTC (rev 4772)
@@ -2730,7 +2730,9 @@
var tgt = ScreenToMapUnits(rcx2, rcy2);
var dx = tgt.X - center.X, dy = tgt.Y - center.Y;
var r = Math.sqrt(dx*dx + dy*dy);
-
+
+ if(r == 0)
+ return;
RequestCircleSelection(center.X, center.Y, r, appending);
}
More information about the mapguide-commits
mailing list