Preparing Data for Use with Military Symbology in Web Applications

08-15-2022 12:46 PM
Esri Contributor
1 0 1,885

In ArcGIS, military symbology is supported using the Dictionary Renderer. When configuring data symbolized using military symbology for use in a web application, you need to consider which client application the data will be consumed in. Most ArcGIS web applications and app builders (such as Map Viewer, Dashboards, Instant Apps, and Experience Builder) are built using our more modern JavaScript API 4.x, which includes support for reading web maps which include layers configured with the Dictionary Renderer.  This post will describe the steps you need to know in order to prepare data for use with military symbology in those applications.

A few important notes to understand before you get started:  

Web AppBuilder, ArcGIS Dashboards (Classic), and Map Viewer (Classic) are all built using a different version of the JavaScript API (3.x). Because of that, you need to follow some specific steps when configuring the symbology in ArcGIS Pro before publishing. Check out Preparing Data for Use with Military Symbology in Web AppBuilder for that workflow. 

Currently, the Map Viewer does not include the ability to configure a layer in a map with the Dictionary Renderer. For now, in order to configure layers with the Dictionary Renderer for use in web applications, you can either:  

  1. Follow the steps below to use ArcGIS Pro to configure the Dictionary Renderer on layers prior to publishing as a web layer, or  
  2.  Use the JavaScript API 4.x in a custom app to easily configure the Dictionary Renderer directly on the layer. Check out this sample code for guidance.

Now back to our regularly scheduled programming. 

The quest to leverage a military symbology in your web applications begins in ArcGIS Pro, where you will configure your layer(s) with a Dictionary Renderer. ArcGIS Pro uses desktop styles with Dictionary Renderer by default, so you’ll need to configure your layers to use a web style instead. If you are working in ArcGIS Online, the web styles are already shared there, but if you are working with ArcGIS Enterprise or using a custom style of your own, you will need to publish the web style to your organization first (we show you how to do this below). 

Once you have your layers configured with the web style, you are ready to share it as a web map to your portal. Your web applications will use the web style to draw the features in your map with military symbols you configured in ArcGIS Pro.  

Now let's break that down a bit. 

To complete this workflow, you’ll need:  

  • Data ready to be configured with a dictionary renderer,  
  • A military dictionary web style (which you may need to publish), and 
  • ArcGIS Pro. 

If you don’t have data at hand, you can download a project package with sample data here. The three layers in this package (Land Units, Control Measure – Lines, Control Measure – Areas) can be configured to use MIL-STD-2525Bc2.

Now let’s get started! 

  1. Add your layer to a map in ArcGIS Pro. If you are working with the project package linked above, this step is already complete.
  2. In the Symbology pane for the layer, choose Dictionary as the renderer.
  3. Configure the layer with a web style as opposed to the desktop styles ArcGIS Pro provides by default. To specify a web style, navigate More > Add custom dictionary… and then follow the appropriate set of steps below:
    1.  ArcGIS Online: In the Add a style file window select the style that corresponds to the military symbol standard used in the layer. For use in web applications be sure to choose the latest version.
      1. Under Portal select ArcGIS Online.
      2. Search box - owner:"styles_esri" type:"Style" to narrow the results down to the military dictionary web styles provided by Esri.
    2. ArcGIS Enterprise: You may have to publish a military dictionary desktop style (released with Pro) as a web style if it is not already available. To do so, follow the steps below: 
      1. Symbology pane: First choose the symbol standard you want to publish in the Dictionary drop down (if it’s a custom style, you’ll need to first click More > Add custom dictionary and browse to your custom desktop style).  Then click More > Add dictionary to project. The style should now appear in the Catalog pane. 
      2. From the Catalog pane, expand Styles, right-click the military style and select Share as Web Style. This will create a new portal item in Enterprise, which you should now be able to search for and add in the Symbology pane as in Step 3a
    3. If you hover over the Dictionary you selected, you should now see a URL indicating you are in fact using a web style (if a desktop style is selected in the drop-down, just the name of the style is displayed when hovering):
  4. Configure the Dictionary Renderer by mapping the Symbol and Text Fields that the dictionary is expecting to the fields in your data.  
    1. If there is a SIDC field, only that field needs to be mapped as a Symbol field. If there are additional fields in the data that can be used as text amplifiers in the symbol, you can map them as well. 
    2. Set configuration properties. 
    3. Set scale factor if needed. 
  5. Now that your layer is configured with a web style to use the correct symbology, navigate to the Share tab and select Web Map. 
    1. Under Select a Configuration, be sure to uncheck Use symbol types compatible with all clients. This ensures the dictionary style symbols will be used, which are compatible with applications built using the JavaScript API 4.x.
  6. Voila! Now you can view this web map in the Map Viewer, but WARNING: If you change the symbology properties of the layer in the Map Viewer you cannot go back to configuring the Dictionary Renderer. Other functionality will still work like editing, configuring popups, etc. 

You now have a web map that will work in ArcGIS web applications such as Experience Builder, Instant Apps, Dashboards, and so on. If you need to make any further modifications to the Dictionary Renderer settings in the map, you will need to do this in ArcGIS Pro.