Select to view content in your preferred language

Regarding Military Symbology

661
3
09-12-2017 03:03 AM
Bhargav_KumarK
Emerging Contributor

Hello,

I have two questions.

1) I am using Mil2525d  symbology in Arc GIS Runtime SDK 100.1. I created a Military Symbology Picker Application for Mil2525d symbology. For one symbol e.g: "Weapon/Weapon System : Direct Fire Gun : Heavy", I got key 'S-G-EWDHS-'. How to use this code to draw  symbol on graphics overlay?

2) I am using Mil2525c symbology in Arc GIS Runtime SDK 100.1. I created a Military Symbology Picker Application for Mil2525c symbology. For one symbol e.g: "Weapon/Weapon System : Direct Fire Gun", I got key '15110700'. How to use this code to draw  symbol on graphics overlay?

Basically my observation is I got same symbols in Mil2525c and mil2525d symbology but for symbols I am getting key as numeric or alphabetic. In Mil2525d I am able to use numeric keys and in mil2525c I am able to use alphabetic keys. How to use both numeric and alphabetic  keys in any one symbology(either Mil2525d or Mil2525c Symbology)?

0 Kudos
3 Replies
LucasDanzinger
Esri Frequent Contributor

How are you getting the key? Are you using SymbolStyle::searchSymbols, and then getting back the result through the list model? If so, instead of getting the key from the SymbolStyleSearchResult, you can directly get the Symbol object. Once you have that, construct a Graphic by giving it geometry and the symbol obtained from the search - Graphic Class | ArcGIS for Developers 

Then, add the Graphics that you create to a GraphicsOverlay, which should be added to our MapView or SceneView.

0 Kudos
Bhargav_KumarK
Emerging Contributor

Thanks Lucas. Yes I was using SymbolStyle::searchSymbols for getting SymbolStyleSearchResultListModel and then key. As you told I am constructing graphic from Symbol object which we get from SymbolStyleSearchResult. This gives default symbol. But my query is how to add properties like 'uniquedesignation' for getting label, 'identity' for specifying hostile/friend to the Symbol Object and getting reflected on the graphic?  I tried following way could not get output.

      

    QVariantMap map;

    map.insert("uniquedesignation", "T 1");
    map.insert("additionalinformation", "C 1");

// this I get from signal  DictionarySymbolStyle::searchSymbolsCompleted

      Esri::ArcGISRuntime::SymbolStyleSearchResultListModel *l_parameters;

        

       QList<Esri::ArcGISRuntime::SymbolStyleSearchResult> l_searchResults = l_parameters->searchResults();

        Esri::ArcGISRuntime::Symbol * l_s = l_searchResults.at(0).symbol();

        Point pointGeometry(7908300, 3161230 , m_map->spatialReference());

        Graphic* pointGraphic = new Graphic(pointGeometry,map, l_s, this);

         m_graphicsOverlay->graphics()->append(pointGraphic);

0 Kudos
LucasDanzinger
Esri Frequent Contributor

2 things you can try:

1) Instead of searching for symbols, apply a DictionaryRenderer to the GraphicsOverlay. This is demonstrated in the Graphics Overlay Dictionary Renderer sample - arcgis-runtime-samples-qt/GODictionaryRenderer.cpp at master · Esri/arcgis-runtime-samples-qt · GitH... The key is to create graphics where each attribute maps to one of the 2525d fields, and the renderer will automatically display the symbol

2) Use the fetchSymbol method on DictionarySymbolStyle. If you feed all of the various attributes you want into that method, you will get a symbol back that you could add to a graphics overlay

0 Kudos