[fusion-users] Mapguide Eventhandling with Fusion.

Paul Spencer pspencer at dmsolutions.ca
Wed May 14 13:39:11 EDT 2008


Tómas,

these are not the droids you are looking for!  These events only  
relate to loading the map definition from the server, not drawing the  
map.  You want Fusion.Event.MAP_BUSY_CHANGED.  This gets called when  
the map starts drawing and again when it is finished, but you need to  
check map.isBusy to see if the map is still busy or not because  
several busy states can be queued up.

Cheers

Paul

On 14-May-08, at 12:57 PM, Tómas Guðmundsson wrote:

> Hi all.
>
> I just conducted a little experiment with the Event Handlers in Map.js
>
>        map.registerForEvent(Fusion.Event.MAP_LOADING,  
> alert('MAP_LOADING'));
>         
> map.registerForEvent(Fusion.Event.MAP_LOADED,alert('MAP_LOADED'));
>         
> map.registerForEvent(Fusion.Event.MAP_RELOADED,alert('MAP_RELOADED'));
>
> And what I originally thought what would happen that it would give  
> me an alert
> at first when it was loading, and then when it would load. Then I  
> thought it would
> give me the third alert when i pressed the refresh map button. But,  
> what happened
> was before the map was ready or visible to me, they all loaded  
> consecutively so
> I got three alerts in a row.
>
> If anyone can tell me why this is or what the reasons are behind  
> that I would really
> appreciate that. Also if anyone can tell me how to find out when the  
> map is visible,
> after a refresh or after any (first or last time a user) sees the  
> gray background of
> the map itself.
>
> Regards,
> Tómas.
> _______________________________________________
> fusion-users mailing list
> fusion-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fusion-users


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://www.dmsolutions.ca/



More information about the fusion-users mailing list