[mapguide-users] Get the Cursor Position and show tooltip in the toolbar

Iulia Tamas iulia_tamas30 at yahoo.com
Thu Oct 27 03:38:26 EDT 2011


Hello,


Can anybody give me any hint about either of the issues?
I would really appreciate your answer...

Iulia



________________________________
From: Iulia Tamas <iulia_tamas30 at yahoo.com>
To: "mapguide-users at lists.osgeo.org" <mapguide-users at lists.osgeo.org>
Sent: Tuesday, October 25, 2011 11:46 AM
Subject: [mapguide-users] Get the Cursor Position and show tooltip in the toolbar


Hello,

I have the following 2 questions:

1)  How could I get the cursor position when a layer is selected?
     I have the following code for handling the selection:

 var Fusion = parent.parent.fusionFrame.Fusion;
 themap = Fusion.getWidgetById('Map');
 themap.registerForEvent(Fusion.Event.MAP_SELECTION_ON, handleSelection);
 
function handleSelection() { 
      var maps =  themap.getAllMaps();
      var map = maps[0];
      map.getSelection(selectionCallback);
}
function selectionCallback(sel) {
     for (var i = 0; i < sel.getNumLayers(); i++)
 {
           var selLayer = sel.getLayer(i);
           var selectedObjects=selLayer.getNumElements();
     }

 }

2)  How could I show a tooltip info in the primary toolbar ? 


I'm using Mapguide 2.2, viewer: Fusion


Thank you,
Iulia

_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20111027/09d2dab1/attachment-0001.html


More information about the mapguide-users mailing list