Convert features into graphics to show them with mil2525d symbols.
      
  
    
Use case
A dictionary renderer uses a style file along with a rule engine to display advanced symbology. This is useful for displaying features using precise military symbology.
How to use the sample
Pan and zoom around the map. Observe the displayed military symbology on the map.
How it works
- Create a 
GeodatabaseusingGeodatabase(geodatabasePath). - Load the geodatabase asynchronously using 
Geodatabase.LoadAsync(). - Instantiate a 
SymbolDicitonaryusingSymbolDictionary(specificationType).specificationTypewill be the mil2525d.stylx file.
 - Load the symbol dictionary asynchronously using 
DictionarySymbol.LoadAsync(). - Wait for geodatabase to completely load.
 - Cycle through each 
GeodatabaseFeatureTablefrom the geodatabase usingGeodatabase.GeodatabaseFeatureTables. - Create a 
FeatureLayerfrom each table within the geodatabase usingFeatureLayer(GeodatabaseFeatureTable). - Load the feature layer asynchronously with 
FeatureLayer.LoadAsync(). - Wait for each layer to load.
 - After the last layer has loaded, then create a new 
Envelopefrom a union of the extents of all layers.- Set the envelope to be the 
Viewpointof the map view usingMapView.SetViewpoint(new Viewpoint(Envelope)). 
 - Set the envelope to be the 
 - Add the feature layer to map using 
Map.OperationalLayers.Add(FeatureLayer). - Create 
DictionaryRenderer(SymbolDictionary)and attach to the feature layer. 
Relevant API
- DictionaryRenderer
 - SymbolDictionary
 
Offline data
This sample downloads the following items from ArcGIS Online automatically:
- mil2525d.stylx - A stylx file for use with ArcGIS Runtime 100.0 - 100.4 to build custom applications that incorporate the MIL-STD-2525D symbol dictionary.
 - militaryoverlay.geodatabase.zip - This is a mobile geodatabase created from the Military Overlay template for use in ArcGIS Runtime samples
 
Tags
military, symbol
Sample Code
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage x:Class="ArcGISRuntime.Samples.FeatureLayerDictionaryRenderer.FeatureLayerDictionaryRenderer"
             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">
    <esriUI:MapView x:Name="MyMapView" />
</ContentPage>