[mapguide-commits] r5516 - in sandbox/adsk/2.3r/Web/src:
mapviewerjava mapviewernet
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Mon Jan 31 21:01:42 EST 2011
Author: hubu
Date: 2011-01-31 18:01:42 -0800 (Mon, 31 Jan 2011)
New Revision: 5516
Modified:
sandbox/adsk/2.3r/Web/src/mapviewerjava/common.jsp
sandbox/adsk/2.3r/Web/src/mapviewernet/common.aspx
Log:
Fixed Ticket: https://trac.osgeo.org/mapguide/ticket/1592
The reason of this issue is there are some errors in the regular expression in ASPX/JSP. When the user rotate the clip box by 90 degrees, the value of the rotation in ASPX/JAP is -90.
However, the regular expression can't handle the negative numbers. I just modify the regular expression to deal with the negative numbers.
Modified: sandbox/adsk/2.3r/Web/src/mapviewerjava/common.jsp
===================================================================
--- sandbox/adsk/2.3r/Web/src/mapviewerjava/common.jsp 2011-01-31 02:45:58 UTC (rev 5515)
+++ sandbox/adsk/2.3r/Web/src/mapviewerjava/common.jsp 2011-02-01 02:01:42 UTC (rev 5516)
@@ -64,7 +64,7 @@
String strval = GetParameter(request, name);
if(strval.equals(""))
return 0;
- if(Pattern.matches("^(\\d+)([.]{0,1})(\\d*)$", strval))
+ if(Pattern.matches("^([-]{0,1})(\\d+)([.]{0,1})(\\d*)$", strval))
return Double.parseDouble(strval);
else
return 0;
Modified: sandbox/adsk/2.3r/Web/src/mapviewernet/common.aspx
===================================================================
--- sandbox/adsk/2.3r/Web/src/mapviewernet/common.aspx 2011-01-31 02:45:58 UTC (rev 5515)
+++ sandbox/adsk/2.3r/Web/src/mapviewernet/common.aspx 2011-02-01 02:01:42 UTC (rev 5516)
@@ -94,7 +94,7 @@
String strval = GetParameter(parameters, name);
if ("" == strval)
return 0;
- if(System.Text.RegularExpressions.Regex.IsMatch(strval,@"^(\d+)([.]{0,1})(\d*)$"))
+ if(System.Text.RegularExpressions.Regex.IsMatch(strval,@"^([-]{0,1})(\d+)([.]{0,1})(\d*)$"))
return Convert.ToDouble(strval, NumberFormatInfo.InvariantInfo);
else
return 0;
More information about the mapguide-commits
mailing list