| Events |
|
The Autodesk MapGuide Viewer API fires a number of events that can be used to determine when the selection changes, when the map is redrawn, or when map features are double-clicked. In addition, events are used upon completion of certain API requests. For additional information about events, observers, and setting up event handler interfaces, refer to "Handling Busy State and Map Refresh" in the Autodesk MapGuide Developer's Guide.
onBusyStateChanged, onMapLoaded, onViewChanged, and onViewChanging might not work properly under Netscape 4.x when the map is first loaded. This is because the observer applet loads on a different thread from the map, so the map might load before the observer applet has finished loading. These events work correctly after the map and the observer applet have both finished fully loading. The workaround to this limitation is to use the ActiveX Control, or to avoid relying on these events when the map first loads.
| ActiveX Control | Plug-In and Java Edition | Description |
| onAddMapLayer | onAddMapLayer | This event is fired when a new map layer has been added. |
| onBeginLayout | onBeginLayout | This event is fired just before the Autodesk MapGuide Viewer uses the internal algorithm to lay out the page elements. |
| onBusyStateChanged | onBusyStateChanged | This event is fired when Autodesk MapGuide Viewer enters and exits busy states. |
| onDigitizedCircle | onDigitizedCircle | This event is fired when the user has finished digitizing a circle. |
| onDigitizedPoint | onDigitizedPoint | This event is fired when the user has finished digitizing a point. |
| onDigitizedPolygon | onDigitizedPolygon | This event is fired when the user has finished digitizing a polygon. |
| onDigitizedPolyline | onDigitizedPolyline | This event is fired when the user has finished digitizing a polyline. |
| onDigitizedRectangle | onDigitizedRectangle | This event is fired when the user has finished digitizing a rectangle. |
| onDoubleClickObject | onDoubleClickObject | This event is fired when the user double-clicks on a map feature. |
| onEndLayout | onEndLayout | This event is fired after the Autodesk MapGuide Viewer has finished the internal layout of the page elements, but before the map is sent to the printer. |
| onMapLoaded | onMapLoaded | This event is fired when Autodesk MapGuide loads an MWF into the Autodesk MapGuide Viewer, but before the first refresh. |
| onSelectionChanged | onSelectionChanged | This event is fired when the map selection has changed. |
| onViewChanged | onViewChanged | This event is fired after the view of the map has been updated or refreshed. |
| onViewChanging | onViewChanging | This event is fired just before each map refresh. |
| onViewedDistance | onViewedDistanceEx | This event is fired when a user had finished viewing distances via the viewDistance method or the user interface menu commands. |
| onViewedDistanceEx | onViewedDistance | This event is fired when a user has finished viewing distances via the viewDistanceEx method. |