[mapguide-users] onviewchanged ?

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Tue Jul 29 06:06:44 EDT 2008


You have to hook into the functions "OnMapLoading" and "OnMapLoaded":
//Save a copy, in case there are multiple hookups
mapLoadingCallBack = map.GetMapFrame().OnMapLoading;
mapLoadedCallBack = map.GetMapFrame().OnMapLoaded;

//Assign new functions
map.GetMapFrame().OnMapLoading = hijacked_onLoading;
map.GetMapFrame().OnMapLoaded = hijacked_onLoaded;

You can then implement your handler like this:
function hijacked_onLoading()
{
try {
//Perform you own stuff here...
} catch (e) {
}

//Call the previous owner
if (mapLoadingCallBack != null)
mapLoadingCallBack();
}

Regards, Kenneth Skovhede, GEOGRAF A/S



lgoubet skrev:
> Hi,
>
> I would like to known if it’s possible to know when the users make a zoom
> (onviewchanged). 
> I don’t see nothing in the The API .
>
>
> Thanks for your help,
> Lionel
>
>   


More information about the mapguide-users mailing list