[mapguide-users] GetSessionID() using with fusion

Radosław Designers rb at designers.pl
Sun Apr 25 16:56:55 EDT 2010

Hi all
I wrote a simillar message about a month ago, and i still don't know how can I use GetSessionID() function in fusion. 
I try to use it like this:
include 'C:\Program Files\OSGeo\MapGuide\Web\www\mapviewerphp\constants.php';
MgInitializeWebTier('C:\Program Files\OSGeo\MapGuide\Web\wwww\webconfig.ini');
$site = new MgSite();
$site->Open(new MgUserInformation("Anonymous", ""));
$sessionId = $site->CreateSession();
$webLayout = "Library://TEST.WebLayout";
<script type="text/javascript" src="../../../lib/fusion.js"></script>
<script type="text/javascript" src="../../../layers/MapGuide/MapGuideViewerApi.js"></script>
<script type="text/javascript" src="../../../layers/MapGuide/MapGuide.js"></script>
window.onload = function() {
 var mapWidget = window.top.iFrameMap.Fusion.getWidgetById('Map'); 
 SESSION = mapWidget.getSessionID();
 MAPNAME = mapWidget.getMapName(); 
<div id="Map" style="position: relative; width: 400px; height: 400px"></div>
<iframe id="iFrameMap" name="iFrameMap" width="0%" height="0%" frameborder=0 scrolling="no" src="/mapguide/mapviewerajax/?SESSION=<?= $sessionId ?>&WEBLAYOUT=<?= $webLayout ?>"></iframe>

Can someone send me a sample aplication that use getSessionID() in Fusion. My email: fotka18 at o2.pl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20100425/31536a18/attachment.html

More information about the mapguide-users mailing list