Tolerance for selection
Jim O'Leary
joleary.public at gmail.com
Tue Oct 17 16:04:27 EDT 2006
I have found the reply from ctallman to be most helpful. Make a small PNG and
use Studio to replace the default circle. Selecting the PNG has much better
success than selecting the default circle.
Farah-2 wrote:
>
> 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
>
>
>
--
View this message in context: http://www.nabble.com/Tolerance-for-selection-tf2432048.html#a6862995
Sent from the OSGeo MapGuide mailing list archive at Nabble.com.
More information about the Mapguide_users
mailing list