Events in MS Virtual Earth

Microsoft’s Virtual Earth documentation is pretty good, once you get past the impossibly-to-navigate design. One missing bit shows that they don’t do nearly enough functional programming: they left out what the callback functions take as an argument.

The callback functions (like in VEMap.AttachEvent(event_name, callback)) take a MapEvent. The four fields of a MapEvent are view, oblique, error, and requestedView. The view is a copy of the currentView and is actually documented; the oblique is the event information, but so far it’s just a new Object; the error is either the empty string or some exception; the requestedView is a copy of the MapView, but in my experience it’s usually set to null.

Advertisements
%d bloggers like this: