SetMapRedraw()
Summary
Controls whether map windows redraw automatically.
Syntax
SetMapRedraw(string map_name, boolean redraw_flag)
| Argument | Contents |
|---|---|
| map_name | The name of the map, or null for the current map |
| redraw_flag | If "True" (the default), the map is redrawn automatically. If "False" map drawing is suppressed except for explicit calls toRedrawMap() |
Notes
-
When a map is changed (e.g., by adding or removing layers, changing the scope or display settings) the map is marked to be redrawn automatically. The automatic redraw takes place whenever its window is uncovered (e.g., when a dialog box is hidden, or another window that obscures a portion of the map is moved).
-
SetMapRedraw() prevents automatic map redraws, so that the map is drawn only when RedrawMap() is called.
Example
SetMapRedraw("My Map", "False") // Turn off the automatic drawing...
... // Do a bunch of processing that affects the map
SetMapRedraw("My Map", "True") // Turn the flag back on
RedrawMap() // Redraw the map
Error Codes
| Error Type | Meaning |
|---|---|
| NotFound | There is no map by the specified name |
See Also
| Function | Summary |
|---|---|
| GetMapRedraw() | Gets the current state of the redraw flag as set by SetMapRedraw() |
| SetMapSaveFlag() | Sets the flag that indicates whether a map has changed since it was last saved to a file |