Map Timeout

7 messages Options
Embed this post
Permalink
durrrr

Map Timeout

Reply Threaded More More options
Print post
Permalink
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
Martin Morrison

RE: Map Timeout

Reply Threaded More More options
Print post
Permalink
Under the presumption that the user didn't do anything during that 10 minutes...  This is by design.  There is a timeout which clears your user session if no activity occurs.  It's a good thing.
________________________________________
From: [hidden email] [[hidden email]] On Behalf Of durrrr [[hidden email]]
Sent: Friday, November 06, 2009 5:40 AM
To: [hidden email]
Subject: [mapguide-users] Map Timeout

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
--
View this message in context: http://n2.nabble.com/Map-Timeout-tp3957975p3957975.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Kenneth Skovhede, GEOGRAF A/S

Re: Map Timeout

Reply Threaded More More options
Print post
Permalink
In reply to this post by durrrr
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
>  
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Gabriele Monfardini

Re: Map Timeout

Reply Threaded More More options
Print post
Permalink
In reply to this post by Martin Morrison
> Under the presumption that the user didn't do anything during that 10 minutes...  This is by design.  There is a timeout which clears your user session if no activity occurs.  It's a good thing.

It would be a good thing if:

- default timeout was longer, at least 1 hour (maybe the user is not
doing anything with the map, but he's working with the data related to
the map).

- users were informed that session has expired and they have to reload
the page (losing placement and zoom level, not to mention object in
redlining layers).

It is not a case that many end up pinging manually the server...
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Kenneth Skovhede, GEOGRAF A/S

Re: Map Timeout

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
I disagree that a one-hour timeout is better.
If a user keeps pressing "reload" in the browser, you get a huge number of sessions created within an hour.

The problem (also with notifying the user) will be fixed in 2.2:
http://trac.osgeo.org/mapguide/wiki/MapGuideRfc66
Regards, Kenneth Skovhede, GEOGRAF A/S


Gabriele Monfardini skrev:
Under the presumption that the user didn't do anything during that 10 minutes...  This is by design.  There is a timeout which clears your user session if no activity occurs.  It's a good thing.
    

It would be a good thing if:

- default timeout was longer, at least 1 hour (maybe the user is not
doing anything with the map, but he's working with the data related to
the map).

- users were informed that session has expired and they have to reload
the page (losing placement and zoom level, not to mention object in
redlining layers).

It is not a case that many end up pinging manually the server...
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
  

_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Mauricio Villablanca

Re: Map Timeout

Reply Threaded More More options
Print post
Permalink
(This post was updated on )
In reply to this post by durrrr
I added a script in a hidden frame that refreshes the map every 5 minutes to keep the session active. The script also prompts the user  every half an hour whether he wants to keep using the map. If no answer, the map is closed.


var time = getTime();
var timeToBug = getTime();
var timeout;

function timer() {
  now= getTime();
  elapsed = (now - time)/1000;
  elapsedAll = (now - timeToBug)/1000;
  if (elapsed > 300) {
     parent.mapFrame.refresh(); //target the right frame
     time = getTime();
  } else if (elapsedAll > 1800) {
      alert ("Do you want to keep using the map?");
      //get answer....
  }
  clearTimeout (timeout);
}

function onLoad() {
    timeout = setTimeOut(timer, 20000); //allow 20 seconds for the map to load
}





durrrr wrote:
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
zspitzer

Re: Map Timeout

Reply Threaded More More options
Print post
Permalink
you can always tweak the session timeout via serverconfig.ini

On Wed, Nov 11, 2009 at 3:25 PM, Mauricio Villablanca
<[hidden email]> wrote:

>
> I added a script that refreshes the map every once in a while to keep the
> session active.
>
>
> durrrr wrote:
>>
>> 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
>>
>
> --
> View this message in context: http://n2.nabble.com/Map-Timeout-tp3957975p3984405.html
> Sent from the MapGuide Users mailing list archive at Nabble.com.
> _______________________________________________
> mapguide-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>



--
Zac Spitzer
Solution Architect / Director
Ennoble Consultancy Australia
http://www.ennoble.com.au
http://zacster.blogspot.com
+61 405 847 168
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users