Well, this is the code I have:

        var initTimer;
        var viewer;
        var showtime;
        var scale;
        
        
function InitDocument()
{
    initTimer = setInterval(DelayedInit, 400);
}

function DelayedInit() {
    try {
        
       viewer = ViewerFrame.mapFrame;
           
       if(viewer.mapInit) {
    
                        clearInterval(initTimer);
                        showtime=window.setInterval(escala, 300000);//5minutes
                        
                        ViewerFrame.mapFrame.OnMapLoading = function(e)
                        {
                                //reset timer
                                clearInterval(showtime);
                                showtime=window.setInterval(escala, 300000);
                        }
        
       }
   }
    catch(e) {}
}

function escala()
{
        scale=ViewerFrame.mapFrame.GetScale();
} 


Now the explanation:
I wanted to call any viewer api function, everytime the map is inactive at 5
minutes, in order to keep the mapguide session alive. 
If user makes the map load again, that timer would be restarted. I'm testing
this solution yet.

Could you give me some hints? Do you think it's possible? Remember, call an
api function only when the map is inactive at 5 minutes.



Cheers
Rui




macieksk wrote:
> 
> Hi.
> 
> what did you whant to do?
> 
> 1. Use loading image when map is loaded?
> 
> write someting more.
> 
> 
> 
> ruivilanova pisze:
>> Hi all,
>> 
>> 
>> does anyone know how to use onMapLoaded event?
>> 
>> 
>> Thanks in advance
>> 
>> Rui
> 
> 
> -- 
> 
> 
> Maciej Skórczewski
> _______________________________________________
> mapguide-users mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/OnMapLoaded-tf4804147s16610.html#a13745905
Sent from the MapGuide Users mailing list archive at Nabble.com.

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

Reply via email to