[mapguide-commits] r7138 - trunk/MgDev/Web/src/viewerfiles
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Fri Oct 19 08:01:04 PDT 2012
Author: jng
Date: 2012-10-19 08:01:03 -0700 (Fri, 19 Oct 2012)
New Revision: 7138
Modified:
trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ
Log:
#1282: Parameterize the point selection "buffer" distance. This doesn't change the size as described in the ticket, but it will make customizing this value much easier.
Modified: trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ
===================================================================
--- trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ 2012-10-19 14:27:27 UTC (rev 7137)
+++ trunk/MgDev/Web/src/viewerfiles/ajaxmappane.templ 2012-10-19 15:01:03 UTC (rev 7138)
@@ -347,6 +347,7 @@
var mapImgFormat = "PNG";
var selectionImgFormat = "PNG";
var queryVariant = "INTERSECTS";
+var bufferPx = 2;
var simulateCirclePoints = [];
var simulateCircleHalfPointNumber = 40;
@@ -2906,10 +2907,10 @@
}
else if(tool == 0)
{
- if((x2 - x1 <= 2) && (y2 - y1 <= 2))
+ if((x2 - x1 <= bufferPx) && (y2 - y1 <= bufferPx))
{
- pt1 = ScreenToMapUnits(x1-2, y1-2);
- pt2 = ScreenToMapUnits(x1+2, y1+2);
+ pt1 = ScreenToMapUnits(x1-bufferPx, y1-bufferPx);
+ pt2 = ScreenToMapUnits(x1+bufferPx, y1+bufferPx);
RequestPointSelection(pt1.X, pt1.Y, pt2.X, pt2.Y, appending);
}
else
@@ -3751,8 +3752,8 @@
req = CreateRequestHandler();
req.open("POST", webAgent, true);
req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
- x1 = x - 2; x2 = x + 2;
- y1 = y - 2; y2 = y + 2;
+ x1 = x - bufferPx; x2 = x + bufferPx;
+ y1 = y - bufferPx; y2 = y + bufferPx;
pt1 = ScreenToMapUnits(x1,y1);
pt2 = ScreenToMapUnits(x2,y2);
geom = MakeWktPolygon(pt1.X, pt1.Y, pt2.X, pt2.Y);
More information about the mapguide-commits
mailing list