Migrating from 10.2.7 to 100.2.1 military symbology

247
3
06-19-2018 05:05 AM
New Contributor

We are currently in the process of migrating from 10.2.7 to 100.2.1 and therefor moving from using the older way of showing symbols (message layer) to the new(for us)/current way.  Most of the migration work is done except the military symbology. 

Essentially I am trying to get our software working, as it was, with the new SDK before I start switching from MIL2525C to MIL2525D.

The guide/API/samples available seem to be vague or overly simplified, at least as far as I can see when relating to how we had been generating the 2525C symbols, i.e. using the message layer method.  

How we were creating some of the symbols was like this:

Message msg = new Message();

msg.Id = symbol.ID;
msg.Add("_type", "position_report");
msg.Add("_action", "update");
msg.Add("_control_points", symbol.Grid.GlobalGrid.MapPoint.X.ToString() + "," + symbol.Grid.GlobalGrid.MapPoint.Y.ToString());
msg.Add("_wkid", symbol.Grid.GlobalGrid.MapPoint.SpatialReference.Wkid.ToString());
msg.Add("sic", symbol.SymbolID);
msg.Add("uniquedesignation", symbol.Designation);

layer.ProcessMessage(msg);

I have looked at info here:

Display military symbols with a dictionary renderer—ArcGIS Runtime SDK for .NET | ArcGIS for Develop... 

Here, which uses a sample geodatabase

arcgis-runtime-samples-dotnet/src/WPF/ArcGISRuntime.WPF.Viewer/Samples/Layers/FeatureLayerDictionary... 

All examples I can find either use a sample geodatabase or an online resource.  I cannot find a clear example of how to create a symbol (2525C or 2525D) using key/value pairs as was used in the older 10.2.7 way of doing it.  

I have managed to create and initialize the dictionary from information found here:

Failed to create Rule Engine: mil2525c 

I would have thought those kinds of details would have been defined somewhere in the guide?

So I can see how to search and pull out symbols but what I really want is to use a feature layer with the dictionary as  the render, create a graphic object with the correct key/value pairings - similar to the 10.2.7 way we were doing it above.  I.e migrate in an evolutionary way rather than revolutionary.

I could be that I have missed an example in all my searching or that our way of creating these symbols is no longer supported.

Either way, can someone shed some light please?

Thanks,

Mark

Reply
0 Kudos
3 Replies
New Contributor

Has anyone managed to do this yet?

Reply
0 Kudos
Esri Contributor

There is a SDK sample that is similar that loads XML messages from a file into a GraphicsOverlay: https://github.com/Esri/arcgis-runtime-samples-qt/tree/master/ArcGISRuntimeSDKQt_QMLSamples/DisplayI... - the other method mentioned above uses a FeatureLayer where the tables column names correspond to the message attribute names.

Below is some more information on the 3 different ways to create a symbol: FeatureLayer, GraphicsOverlay, or SymbolDictionary. FeatureLayer, GraphicsOverlay are used to draw on the map and SymbolDictionary is mainly used to create images.

https://www.esri.com/arcgis-blog/products/api-cqt/defense/working-with-mil-std-2525d-symbology-using...

https://developers.arcgis.com/net/latest/uwp/guide/display-military-symbols-with-a-dictionary-render... 

Reply
0 Kudos
New Contributor

HI I must to draw 2525D in ArcGis Runtime 100.5

I have sample code like

msg.Add("_type", "position_report");
msg.Add("_action", "update");
msg.Add("_control_points", symbol.Grid.GlobalGrid.MapPoint.X.ToString() + "," + symbol.Grid.GlobalGrid.MapPoint.Y.ToString());
msg.Add("_wkid", symbol.Grid.GlobalGrid.MapPoint.SpatialReference.Wkid.ToString());
msg.Add("sic", symbol.SymbolID);
msg.Add("uniquedesignation", symbol.Designation);

But i don't know how much parameter attribute i should input(EX: _type,_action....)and they correspond instruction(Position_report)。For Example I don't know why _action is correspond to update。Does it has more attribute to input 。Thank you。 

Reply
0 Kudos