Skip To Content

Display military messages

Military software used for situation awareness and command and control pass secure communications between mobile devices in the field and command centers. These special communications consist of either voice or data transmissions. Data communications can contain military messages, which define where specific military symbols are located on a map.

You can build an app using ArcGIS Runtime SDK for .NET to take these military messages and convert them to military symbols to be displayed in a map control on a desktop or laptop device. Currently, the messages can be displayed using symbology from the Department of Defense (DoD) MIL-STD-2525C symbol dictionary, or from the North Atlantic Treaty Organization (NATO) APP-6B symbol dictionary.

For your app to process a military message, a MessageLayerclass must be created and added to the map. MessageLayer is a group layer that contains a set of MessageSubLayer child layers to display specialized military graphics of various message and geometry types. Use the message layer's ProcessMessage method to create and display the appropriate graphics to display a message.

The following code sample shows the XAML required to add a MessageLayer to the map:

<esri:MapView x:Name="MyMapView">
        <esri:ArcGISTiledMapServiceLayer ID="World Topo Map" 
        <layers:MessageLayer ID="MyMessageLayer"/>

The following code sample uses the MessageLayer to process a message and display the corresponding graphic:

// create a dictionary to hold message properties
var messageProps = new Dictionary<string, string>();

// define message properties (property name, value)
messageProps.Add("_type", "position_report");
messageProps.Add("_action", "update");
messageProps.Add("_id", "e0ba16ac-cddd-4595-845e-32ca4177d080");
messageProps.Add("_control_points", "-117.187,32.770;-117.191,32.725;-117.097,32.653;-116.944,32.610");
messageProps.Add("_wkid", "4326");
messageProps.Add("sic", "GFGPOAO-------X");
messageProps.Add("uniquedesignation", "IGLOO");

// create the message using the properties
var message = new Esri.ArcGISRuntime.AdvancedSymbology.Message(messageProps);

// get the message layer from the map
var messageLayer = (MessageLayer)MyMapView.Map.Layers["MyMessageLayer"];

// make sure it's loaded before using it
await MyMapView.LayersLoadedAsync(new[] { messageLayer });

// call ProcessMessage on the layer
bool success = messageLayer.ProcessMessage(message);
if (!success)
	Trace.WriteLine("Failed to process message.");

A simple message displayed as a graphic in a message layer
Related topics