Autodesk 15606-011408-9300 Developer Guide - Page 46
AutoRefresh Flag Caveats, Detecting Map Refreshes, Detecting a Change in the Busy State
UPC - 606121429548
View all Autodesk 15606-011408-9300 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 46 highlights
AutoRefresh Flag Caveats While autoRefresh is disabled, methods that would normally cause refreshes to occur do not, and the following types of operations may not work as expected: I Enumerating map features on dynamic layers after a pan or a zoom- If your application tries to return the number of features on a dynamic layer prior to a refresh, it will return the number that existed before the pan or zoom occurred. I Querying on or modifying selected features-If your application performs queries or modifications on features on dynamic layers prior to a refresh, the features may not actually exist anymore, or additional features that were added to the selection may be missing. I Operations that require user interaction-Methods such as digitizePoint and digitizeRectangle require users to click or drag the mouse for their input parameters. However, users may be positioning the cursor over a version of the map that is different from the one on which the methods will be performing calculations. I Printing maps on dynamic layers and buffering features on dynamic layers-Features that have not been downloaded onto the displayed map may not appear in the printout or the buffer. Detecting Map Refreshes Autodesk MapGuide Viewer fires the onViewChanging and onViewChanged events both when a map display refresh is about to happen and when one just happened. You can write event-handling code in your application to respond to these events (see Chapter 5, "Handling Events"). However, before the Autodesk MapGuide Viewer fires these events, it disables the autoRefresh flag. When writing your event-handling code for onViewChanging, be sure to avoid methods that don't work when the autoRefresh flag is disabled, as described in the previous section. Detecting a Change in the Busy State Autodesk MapGuide Viewer fires the onBusyStateChanged event when the busy state changes. You can write event-handling code for this event to enable and disable specific user interface elements, such as buttons, in your application. 46 | Chapter 3 Accessing Maps