Autodesk 15606-011408-9300 Developer Guide - Page 47
Controlling Intermediate Update Map Redraw Operations, Handling Errors, Getting Error Codes
UPC - 606121429548
View all Autodesk 15606-011408-9300 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 47 highlights
Controlling Intermediate Update Map Redraw Operations You can use the MGMap.getIntermediateUpdatesEnabled and MGMap.setIntermediateUpdatesEnabled methods to control how frequently Autodesk MapGuide Viewer redraws a map. By default, maps are updated every 1.5 seconds, enabling the end user to progressively view a map as it is being rendered, rather than waiting until the entire map is complete. Changes to the intermediate update setting takes effect on the next redraw or refresh operation. The following JavaScript functions disable and reenable intermediate updates: function disableIntermediateUpdates() { var map = getMap(); var status = map.getIntermediateUpdatesEnabled(); if (status == true) map.setIntermediateUpdatesEnabled(false); } function enableIntermediateUpdates() { var map = getMap(); var status = map.getIntermediateUpdatesEnabled(); if (status == false) map.setIntermediateUpdatesEnabled(true); } Handling Errors Every application should track and handle errors. The Autodesk MapGuide Viewer API has error tracking methods and properties you can use to debug your applications. Getting Error Codes Every time an API method is run or a property is accessed, Autodesk MapGuide updates the MGError object. This object contains error information for the most recently executed method or property. Handling Errors | 47