Autodesk 15606-011408-9300 Developer Guide - Page 108
Accessing Your Application with the Viewer API, New Menu Item, Action, Arguments
UPC - 606121429548
View all Autodesk 15606-011408-9300 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 108 highlights
We can solve both of these problems by creating a custom menu item that takes the place of the report. We do so by selecting the options, as shown in the following illustration, on the Popup Menu tab of the Map Window Properties dialog box. Dialog box specifications for Incident Log popup menu item Here are descriptions of how we used the options on the Popup Menu tab: I New Menu Item -Creates a new popup menu item below the item selected in the Popup Menu list. I Name- Specifies the name of the menu item as it will appear in the Autodesk MapGuide Viewer. Our menu item is named Incident Log. I Action- Specifies the task to be performed by the menu item. We selected GetPointAndSendToURL from the drop-down list. I Arguments-Specifies arguments to use with the selected action, in this case the path to getpoint.cfm and the name of the layer to add data to. When users select Incident Log from the popup menu, they will immediately be able to enter a point, thus bypassing several mouse clicks. Also, if the Incidents layer is not visible because the map is zoomed outside of the layer's display range, the Incidents Log menu item will be unavailable. Accessing Your Application with the Viewer API Because the Incident Log application runs in a separate instance of the browser, it does not have programmatic access to the map window. This means the application cannot refresh the map automatically. (That's why we have a JavaScript alert box telling the user to reload the map manually.) 108 | Chapter 6 Using Reports to Query and Update Data Sources