[mapguide-users] Tolerance for selection

Farah farah at egovernments.org
Tue Oct 17 07:04:23 EDT 2006


Yes..the files will be overwritten..
I guess, we will have to go through the code in the new viewer files to see
if we can change the tolerance! :-(



-----Original Message-----
From: Willem Schwarte [mailto:willem at giskit.nl] 
Sent: Tuesday, October 17, 2006 4:02 PM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] Tolerance for selection

Ok cool... but what happens when a new version of mapguide comes and you
install this.. these files will be overwritten. 

As you don't know if something is changed in one of these
template-files, you cannot just copy them and replace them back after
the install of the new version... or am I wrong?



Willem

-----Oorspronkelijk bericht-----
Van: Farah [mailto:farah at egovernments.org] 
Verzonden: Tuesday, October 17, 2006 10:51 AM
Aan: users at mapguide.osgeo.org
Onderwerp: RE: [mapguide-users] Tolerance for selection

Hi..

We can change the tolerance for selecting points as well as showing
tooltips, by making changes in: ajaxmappane.templ which is in
Viewerfiles.


For tooltips:

function RequestHyperLinkData(id, x, y, exec)
{
    if(lastMapRcv != mapId) return;
    if(isPopupOpen(tbMenu) || isPopupOpen(ctxMenu)) return;
    req = CreateRequestHandler();
    req.open("POST", webAgent, true);
    req.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");
    //x1 = x - 2; x2 = x + 2; commented by farah (original. changed to
show
tooltip)
   // y1 = y - 2; y2 = y + 2; commented by farah (original)
      x1 = x - 5; x2 = x + 5;
      y1 = y - 7; y2 = y + 7;
    pt1 = ScreenToMapUnits(x1,y1);
    pt2 = ScreenToMapUnits(x2,y2);
    geom = MakeWktPolygon(pt1.X, pt1.Y, pt2.X, pt2.Y);
    reqParams =
"OPERATION=QUERYMAPFEATURES&VERSION=1.0.0&PERSIST=0&MAPNAME=" +
encodeURIComponent(mapName) + "&SESSION=" + sessionId + "&SEQ=" +
Math.random() + "&LAYERNAMES=" + encodeURIComponent(GetVisLayers()) +
"&GEOMETRY=" + geom + "&SELECTIONVARIANT=INTERSECTS&MAXFEATURES=1";
    obj = new HlRequest(id, x, y, req, exec);
    req.onreadystatechange = obj.OnHl;
    try { req.send(reqParams); } catch(e) {}
}


For point selection:
In the method: ExecuteRectangleTool

else if(tool == 0)
    {
        if((x2 - x1 <= 2) && (y2 - y1 <= 2))
        {
            x1 -= 2; y1 -= 2;
           // x2 = x1 + 4; y2 = y1 + 4;commented by farah (original)
           x2 = x1 + 8; y2 = y1 + 8;
            pt1 = ScreenToMapUnits(x1, y1);
            pt2 = ScreenToMapUnits(x2, y2);
            RequestPointSelection(pt1.X, pt1.Y, pt2.X, pt2.Y,
appending);
        }


Regards
Farah

-----Original Message-----
From: Jim O'Leary [mailto:joleary.public at gmail.com] 
Sent: Thursday, October 12, 2006 11:37 PM
To: users at mapguide.osgeo.org
Subject: [mapguide-users] Tolerance for selection


Can you change the tolerance for selecting points? The Select tool
doesn't
always select a point. Any tips for making this tool work better?

Thanks
-- 
View this message in context:
http://www.nabble.com/Tolerance-for-selection-tf2432048.html#a6781554
Sent from the OSGeo MapGuide mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
For additional commands, e-mail: users-help at mapguide.osgeo.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
For additional commands, e-mail: users-help at mapguide.osgeo.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
For additional commands, e-mail: users-help at mapguide.osgeo.org





More information about the Mapguide-users mailing list