Graphics overlay (dictionary renderer)

View inMAUIUWPWPFWinUIView on GitHub

This sample demonstrates applying a dictionary renderer to graphics, in order to display military symbology without the need for a feature table.

Image of graphics overlay dictionary renderer

Use case

Use a dictionary renderer on a graphics overlay to display more transient data, such as military messages coming through a local tactical network.

How to use the sample

Pan and zoom to explore military symbols on the map.

How it works

  1. Create a new DictionarySymbolStyle(dictionaryPath).
  2. Create a new DictionaryRenderer(symbolDictionary).
  3. Create a new GraphicsOverlay
  4. Set the dictionary renderer to the graphics overlay.
  5. Parse through the XML and create a graphic for each element.
  6. Use the _wkid key to get the geometry's spatial reference.
  7. Use the _control_points key to get the geometry's shape.
  8. Create a geometry using the shape and spatial reference from above.
  9. Create a Graphic for each attribute, utilizing it's defined geometry.
  10. Add the graphic to the graphics overlay.

Relevant API

  • DictionaryRenderer
  • DictionarySymbolStyle
  • GraphicsOverlay

Offline data

This sample uses the Mil2525d Stylx File and the MIL-STD-2525D XML Message File hosted on ArcGIS Online.

About the data

The sample opens to a view of the county Wiltshire, United Kingdom. It displays military symbols illustrating a simulated combat situation in the area.

Tags

defense, military, situational awareness, tactical, visualization

Sample Code

DictionaryRendererGraphicsOverlay.xamlDictionaryRendererGraphicsOverlay.xamlDictionaryRendererGraphicsOverlay.xaml.cs
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
<UserControl
    x:Class="ArcGIS.UWP.Samples.DictionaryRendererGraphicsOverlay.DictionaryRendererGraphicsOverlay"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:esri="using:Esri.ArcGISRuntime"
    xmlns:esriUI="using:Esri.ArcGISRuntime.UI.Controls">
    <Grid>
        <esriUI:MapView x:Name="MyMapView" />
    </Grid>
</UserControl>

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.