[mapguide-users] Map Timeout

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Fri Nov 6 07:05:19 EST 2009


That is "by design".
The session expires after a certain interval (15 minutes default) of 
inactivity.
You can modify the session timeout interval in the serverconfig.ini file.

The next release of MapGuide has a "ping" option that will keep pinging
MapGuide to keep the session alive, as long as the viewer is displayed.

For now, you have to add your own method, you can do something like this 
in JavaScript:

function pingServer()
{
    var url = GetMapFrame().GetWebAgent(); //Something like 
http://locahost/mapguide/mapagent/mapagent.fcgi
    url += '?OPERATION=RESOURCEEXISTS&VERSION=1.0.0&RESOURCEID=' + 
encodeUriComponent('Library://') + '&SESSION=' + 
GetMapFrame().GetSessionId();
    document.getElementById('hidden-iframe').src = url;
}

window.setInterval(pingServer, 5 * 1000 * 6); //Ping each 5 minutes

Then you need a hidden frame in the html like:
<iframe style="display: none;"></iframe>

You can avoid the iframe, if you know how to do AJAX requests.

(The above code is not tested in any way)

Regards, Kenneth Skovhede, GEOGRAF A/S



durrrr skrev:
> Hi,
>
> Has anyone experienced the problem i am having which is that after a certain
> length of time (10-15mins) the map effectivly times out and all zooming,
> panning and searching layers features dont work anymore...?
>
> thanks in advance
>   


More information about the mapguide-users mailing list