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

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

Reply via email to