Dictionary renderer with graphics overlay

View inAndroidFormsUWPWPFWinUIiOSView on GitHub

Create graphics from an XML file with key-value pairs for each graphic, and display the military symbols using a MIL-STD-2525D web style in 2D.

Image of dictionary renderer graphics overlay

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 using a MIL-STD-2525D dictionary web style.
  2. Create a new DictionaryRenderer from the dictionary symbol style.
  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 MIL-STD-2525D XML Message File hosted on ArcGIS Online.

About the data

The dictionary symbol style in this sample is constructed from a portal item containing a MIL-STD-2525D symbol dictionary web style. This ArcGIS Web Style is used to build custom applications that incorporate the MIL-STD-2525D symbol dictionary. This style supports a configuration for modeling locations as ordered anchor points or full geometries.

Tags

defense, military, situational awareness, tactical, visualization

Sample Code

DictionaryRendererGraphicsOverlay.xamlDictionaryRendererGraphicsOverlay.xamlDictionaryRendererGraphicsOverlay.xaml.cs
1
2
3
4
5
6
7
8
9
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage x:Class="ArcGISRuntimeXamarin.Samples.DictionaryRendererGraphicsOverlay.DictionaryRendererGraphicsOverlay"
             xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms">
    <Grid>
        <esriUI:MapView x:Name="MyMapView" />
    </Grid>
</ContentPage>

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

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close