About dynamic map event cycle
Dynamic map events are fired in the following order:
- IDynamicMapEvents.DynamicMapStarted—Called based on the draw rate and before any drawing is done (dynamic display drawing cannot be done).
- IDynamicMapEvents.BeforeDynamicDraw (esriDMDPLayers)—Only called if non-dynamic layers need tiles. This event will not be fired again until after all the tiles are available and non-dynamic layers need more tiles.
- IDynamicMapEvents.BeforeDynamicDraw (esriDMDPDynamicLayers) —Only called if dynamic layers are dirty and need to be drawn.
- IDynamicMapEvents.AfterDynamicDraw (esriDMDPDynamicLayers)—Only called if dynamic layers are dirty and after they have been drawn.
- IDynamicMapEvents.AfterDynamicDraw (esriDMDPLayers) —Only called when non-dynamic layers have all the necessary tiles.
- IDynamicMapEvents.DynamicMapFinished—Called based on the draw rate and after all drawing is done (dynamic display drawing cannot be done).
To do animation in IDynamicMapEvents, ensure the AfterDynamicDraw event gets fired. This event is fired based on the dynamic map draw rate (IDynamicMap.DynamicDrawRate) and whether or not any of the layers need to be refreshed (both dynamic and non-dynamic layers).
Layers will need to be refreshed as a result of a map action (such as, pan or zoom), the dynamic layer dirty flag being set to true, or non-dynamic layers still needing tiles. However, you can force this event to fire by calling IActiveView.Refresh in the DynamicMapStarted event, DynamicMapFinished event, or your timer.
See Also:
Samples:Development licensing | Deployment licensing |
---|---|
Engine Developer Kit | Engine |
ArcGIS for Desktop Advanced | |
ArcGIS for Desktop Standard | |
ArcGIS for Desktop Basic |