|
1 | 1 | <h1>Symbol Dictionary</h1> |
2 | 2 |
|
3 | | -<p>Find symbols within mil2525d specification that match a keyword.</p> |
| 3 | +<p>Find symbols within the mil2525d specification that match a keyword.</p> |
4 | 4 |
|
5 | 5 | <p><img src="SymbolDictionary.png"/></p> |
6 | | - |
7 | | -<p>There are five ways to search through a Symbol Dictionary: |
8 | | - - Name |
9 | | - - Tags |
10 | | - - Symbol Class |
11 | | - - Category |
12 | | - - Key</p> |
| 6 | + |
| 7 | +<h2>Use case</h2> |
| 8 | + |
| 9 | +<p>You can use support for military symbology to allow users to report changes in the field using the correct military symbols.</p> |
13 | 10 |
|
14 | 11 | <h2>How to use the sample</h2> |
15 | 12 |
|
16 | | -<p>By default, leaving the fields blank and hitting search will find all symbols.</p> |
| 13 | +<p>By default, leaving the fields blank and searching will return all symbols.</p> |
17 | 14 |
|
18 | | -<p>To search for certain symbols: |
19 | | - - enter text into one or multiple seach boxes and hit <code>search for symbols</code> |
20 | | - - this will seach for symbols containing the information that was entered</p> |
| 15 | +<p>To filter symbols, enter text into one or multiple seach boxes and click the Search for Symbols button.</p> |
21 | 16 |
|
22 | | -<p>Clear button: |
23 | | - - will clear any previous search results and start fresh</p> |
| 17 | +<p>Click the Clear button to clear previous search results.</p> |
24 | 18 |
|
25 | 19 | <h2>How it works</h2> |
26 | 20 |
|
27 | | -<p>How to search through a <code>SymbolDictionary</code>:</p> |
28 | | - |
29 | 21 | <ol> |
30 | | - <li>Create a symbol dictionary with the mil2525d specification, <code>SymbolDictionary("mil2525d")</code></li> |
31 | | - <li>Load the dictionary asynchronously, <code>DictionarySymbol.loadAsync()</code> |
32 | | - <ul><li>this will allows the application to continue working while the dictionary loads all symbol primitives found within the mil2525d specification</li></ul></li> |
33 | | - <li>Create search parameters for the dictionary, <code>StyleSymbolSearchParameters()</code>.</li> |
34 | | - <li>Set the parameters to search through the dictionary. |
35 | | - <ul><li>Name, <code>StyleSymbolSearchParameters.getNames().add()</code></li> |
36 | | - <li>Tag, <code>StyleSymbolSearchParameters.getTags().add()</code></li> |
37 | | - <li>Symbol Class, <code>StyleSymbolSearchParameters.getSymbolClasses().add()</code></li> |
38 | | - <li>Category, <code>StyleSymbolSearchParameters.getCategories().add()</code></li> |
39 | | - <li>Key, <code>StyleSymbolSearchParameters.getKeys().add()</code></li></ul></li> |
40 | | - <li>Search through dictionary using parameters, <code>DictionarySymbol.searchSymbolsAsync(StyleSymbolSearchParameters)</code>.</li> |
41 | | - <li>Cycle through the <code>StyleSymbolSearchResult</code> list that was returned and display it to screen. |
42 | | - <ul><li>get <code>CimSymbol</code>,<code>StyleSymbolSearchResult.getSymbol()</code>, and create an image from it, <code>CimSymbol.createSwatchAsync()</code></li> |
43 | | - <li>use other get methods for the symbol's name, tags, symbolClass, category, and key, like <code>StyleSymbolSearchResult.getName()</code></li></ul></li> |
| 22 | + <li>Create a symbol dictionary with the mil2525d specification by passing the string "mil2525d" to the |
| 23 | + <code>SymbolDictionary</code> constructor.</li> |
| 24 | + <li>Create <code>StyleSymbolSearchParameters</code>.</li> |
| 25 | + <li>Add members to the names, tags, symbolClasses, categories, and keys list fields of the search parameters.</li> |
| 26 | + <li>Search for symbols using the parameters with <code>symbolDictionary.searchSymbolsAsync(styleSymbolSearchParameters)</code>.</li> |
| 27 | + <li>Get the <code>Symbol</code> from the list of returned <code>StyleSymbolSearchResult</code>.</li> |
44 | 28 | </ol> |
45 | 29 |
|
46 | 30 | <h2>Relevant API</h2> |
47 | 31 |
|
48 | 32 | <ul> |
49 | | - <li>CimSymbol</li> |
50 | 33 | <li>StyleSymbolSearchParameters</li> |
51 | 34 | <li>StyleSymbolSearchResult</li> |
| 35 | + <li>Symbol</li> |
52 | 36 | <li>SymbolDictionary</li> |
53 | 37 | </ul> |
54 | 38 |
|
| 39 | +<h2>Tags</h2> |
55 | 40 |
|
| 41 | +<p>CIM, MIL-STD-2525B, MIL-STD-2525C, MIL-STD-2525D, defense, look up, mil2525b, mil2525c, mil2525d, military, military |
| 42 | + symbology, symbology</p> |
56 | 43 |
|
0 commit comments