<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:10pt"><div><span>Hello,<br></span></div><div><span><br></span></div><div><span>Can anybody give me any hint about either of the issues?</span></div><div><span>I would really appreciate your answer...</span></div><div><br><span></span></div><div><span>Iulia<br></span></div><div><br></div><div style="font-family: times new roman, new york, times, serif; font-size: 10pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"><font size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Iulia Tamas &lt;iulia_tamas30@yahoo.com&gt;<br><b><span style="font-weight: bold;">To:</span></b> "mapguide-users@lists.osgeo.org" &lt;mapguide-users@lists.osgeo.org&gt;<br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, October 25, 2011 11:46 AM<br><b><span style="font-weight:
 bold;">Subject:</span></b> [mapguide-users] Get the Cursor Position and show tooltip in the toolbar<br></font><br>
<meta http-equiv="x-dns-prefetch-control" content="off"><div id="yiv1780888152"><div><div style="color:#000;background-color:#fff;font-family:times new roman, new york, times, serif;font-size:10pt;"><div>Hello,</div><div><br></div><div>I have the following 2 questions:</div><div><br></div><div>1)&nbsp; How could I get the cursor position when a layer is selected?</div><div>&nbsp;&nbsp;&nbsp;&nbsp; I have the following code for handling the selection:</div><div><br></div><div>&nbsp;var Fusion = parent.parent.fusionFrame.Fusion;<br>&nbsp;themap = Fusion.getWidgetById('Map');<br>&nbsp;themap.registerForEvent(Fusion.Event.MAP_SELECTION_ON, handleSelection);<br>&nbsp;</div><div> function handleSelection() { <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var maps =&nbsp; themap.getAllMaps();<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var map = maps[0];<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.getSelection(selectionCallback);<br>}<br>function selectionCallback(sel)
 {<br>&nbsp;&nbsp;&nbsp;&nbsp; for (var i = 0; i &lt; sel.getNumLayers(); i++)
 {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var selLayer = sel.getLayer(i);</div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var selectedObjects=selLayer.getNumElements();</div><div>&nbsp;&nbsp;&nbsp;&nbsp; }<br></div><div>&nbsp;}</div><div><br></div><div>2)&nbsp; How could I show a tooltip info in the primary toolbar ? <br></div><div><br></div><div>I'm using Mapguide 2.2, viewer: Fusion<br></div><div><br></div><div>Thank you,</div><div>Iulia<br></div></div></div></div><meta http-equiv="x-dns-prefetch-control" content="on"><br>_______________________________________________<br>mapguide-users mailing list<br><a ymailto="mailto:mapguide-users@lists.osgeo.org" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users"
 target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br><br><br></div></div></div></body></html>