Dynamic display layer


Purpose
This sample demonstrates using the ArcGIS Dynamic Display to implement a dynamic layer. A dynamic layer is a custom layer that, in addition to the standard interfaces, implements the IDynamicLayer interface. That interface allows this layer to draw its items into the Dynamic Disiplay and take advantage of graphics card hardware acceleration.
This sample shows implementation of a dynamic layer through inheritance of base-class 'DynamicLayerBase' which is part of the ESRI.ArcGIS.ADF.BaseClasses namespace. In order to use the 'DynamicLayerBase' class, the user must derive from it and override method 'DrawDynamicLayer()'.
This layer uses synthetic data to simulate dynamic data. In case of a real-life dynamic layer, the dynamic data might be streamed to the layer by a communication port, Extensible Markup Language (XML) stream, ArcGIS tracking server, or any other live feed.

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Open the solution using Visual Studio.
  2. Build the solution to make the 'Add Dynamic Layer' command dll.
  3. You will need to use this command in an application with a MapControl and a ToolbarControl such as, the MapControlApplication template included with the Visual Studio Integration.
  4. Add the command to the ToolbarControl. The command can be found in the '.NET Samples' category with the name 'Add Dynamic Layer'.
  5. Run the application and add any layer to use as a background.
  6. Click the 'Add Dynamic Layer' command in order to add the dynamic layer to the map. You will notice that the map will switch into Dynamic-Mode and the layer with 100 dynamic items will get added to the map.

MyDynamicLayerClass.cs Implementation file of the dynamic layer
AddMyDynamicLayerCmd.cs A command that allows to add or remove the dynamic layer
DynamicLayerToolbar.cs The toolbar that hosts the AddMyDynamicLayer command
Download the C# files
MyDynamicLayerClass.vb Implementation file of the dynamic layer
AddMyDynamicLayerCmd.vb A command that allows to add or remove the dynamic layer
DynamicLayerToolbar.vb The toolbar that hosts the AddMyDynamicLayer command
Download the VB.NET files

Download the files for all languages

See Also:

Dynamic display
Walkthrough: Getting started with dynamic display
How dynamic display works
Best practices for using dynamic display
Sample: Dynamic display—tracking dynamic object
Sample: Dynamic display compass
Writing multithreaded ArcObjects code
How to create a dynamic glyph from a marker symbol
Sample: Dynamic logo
Sample: Dynamic heads up display




Development licensing Deployment licensing
Engine Developer Kit Engine
ArcGIS for Desktop Basic
ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced