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

Iulia Tamas iulia_tamas30 at yahoo.com
Tue Oct 25 04:46:32 EDT 2011


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];
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,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20111025/873a1e94/attachment.html

More information about the mapguide-users mailing list