Go to previous topic Go to next topic

These examples show you how to use the Autodesk MapGuide Viewer API. They are not meant to be complete applications, but instead serve to illustrate how the API works. Please feel free to reuse and modify any of the sample code. For basic examples, click here.

Note: Most of these examples reference data on the Autodesk MapGuide Web site, so you will need Internet access to run them, and, of course, you will need to download and install Autodesk MapGuide Viewer on your system.

Event Handling

This example demonstrates how to automatically refresh a map layer every few seconds, and provides event-handling techniques, including the use of Java observers with the Autodesk MapGuide Viewer Plug-In. Users can use controls to the right of the map to enable or disable selection and double-click events, and buttons below the map to digitize features on the map. For additional information about setting up event handler interfaces, refer to "Handling Busy State and Map Refresh" in the Autodesk MapGuide Developer's Guide.

Filter DWG Layers This example demonstrates filtering DWG layers and selecting map features. A list to the right of the map shows the the DWG filters that can be applied to an architectural map of a floor plan. When a user selects one or more filters from the list, the corresponding DWG layer(s) is displayed on the map. The user can also select one or more features on the map and display properties, including names and keys, and DWG layer properties for the current map layer.

Java Edition Examples

These examples demonstrate techniques for implementing the Autodesk MapGuide Viewer, Java Edition. Also refer to the list of Plug-In/Java Edition Downloadable Files required for building Java Edition applications.