[mapguide-users] Event that captures mouse action

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Wed Nov 4 02:44:56 EST 2009


There is a function called "OnMapLoading" which you can hijack like this:

//Keep a reference to the original function
GetMapFrame().original_OnMapLoading = GetMapFrame().OnMapLoading;

//Assign a new function
GetMapFrame().OnMapLoading = function(){

    try {
       
       //Place more meaningfull code here :)
        alert("The map is now loading");

    } catch (e)  //Make sure our code does not break the function
    {}

    //Activate the actual MapGuide handler
    original_OnMapLoading();
};

Regards, Kenneth Skovhede, GEOGRAF A/S



Langen, Gido skrev:
>
> Does anyone know how to capture a mouse click on the map?  I want to 
> do some scale dependent processing and want to capture the scale after 
> zooming in/out.  I need to know the scale right after the zoom in/out, 
> before the map is redrawn. 
>
> Thanks for any insight,
> Gido
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20091104/00628a27/attachment.html


More information about the mapguide-users mailing list