<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SymbolDictionary.GetSymbolImage returning unknown in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/symboldictionary-getsymbolimage-returning-unknown/m-p/383516#M4509</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's another way to do get the symbol if you need that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14158788917496507 jive_text_macro" jivemacro_uid="_14158788917496507"&gt;
&lt;P&gt;SymbolDictionary dictionary = new SymbolDictionary(SymbolDictionaryType.Mil2525c);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;IEnumerable&amp;lt;SymbolProperties&amp;gt; symbols = dictionary.FindSymbols(new List&amp;lt;string&amp;gt;() { "SHGPEVATM-" });&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;var symbolSource = symbols.First().GetImage(128, 128);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;JpegBitmapEncoder encoder = new JpegBitmapEncoder();&lt;/P&gt;
&lt;P&gt;encoder.Frames.Add(BitmapFrame.Create(symbolSource as WriteableBitmap));&lt;/P&gt;
&lt;P&gt;PictureMarkerSymbol symbol = new PictureMarkerSymbol();&lt;/P&gt;
&lt;P&gt;MemoryStream ms = new MemoryStream();&lt;/P&gt;
&lt;P&gt;encoder.Save(ms);&lt;/P&gt;
&lt;P&gt;symbol.SetSource(ms.ToArray());&lt;/P&gt;
&lt;P&gt;ms.Close();&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Graphic g = new Graphic(new MapPoint(0, 0), symbol);&lt;/P&gt;
&lt;P&gt;GraphicsLayer.Graphics.Add(g)&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Nov 2014 11:41:48 GMT</pubDate>
    <dc:creator>AnttiKajanus1</dc:creator>
    <dc:date>2014-11-13T11:41:48Z</dc:date>
    <item>
      <title>SymbolDictionary.GetSymbolImage returning unknown</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/symboldictionary-getsymbolimage-returning-unknown/m-p/383511#M4504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No matter what symbolID I pass in, I only get an unknown image returned.&amp;nbsp; When I use the military layer, the symbol is rendered correctly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SymbolDictionary mil2525Symbols = new SymbolDictionary(SymbolDictionaryType.Mil2525c);&lt;/P&gt;&lt;P&gt;WriteableBitmap imageSource = mil2525Symbols.GetSymbolImage("SHGPEVATM-MQ---", size, size) as WriteableBitmap;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;List&amp;lt;MapPoint&amp;gt; points = new List&amp;lt;MapPoint&amp;gt;();&lt;/P&gt;&lt;P&gt;points.Add(new MapPoint(500000, 500000));&lt;/P&gt;&lt;P&gt;MilitaryMessage message = new MilitaryMessage("1", MilitaryMessageType.PositionReport, MilitaryMessageAction.Update, points);&lt;/P&gt;&lt;P&gt;message.SicCode = "SHGPEVATM-MQ---";&lt;/P&gt;&lt;P&gt;MessageLayer.ProcessMessage(message);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 00:26:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/symboldictionary-getsymbolimage-returning-unknown/m-p/383511#M4504</guid>
      <dc:creator>KeithMacIntyre</dc:creator>
      <dc:date>2014-11-12T00:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: SymbolDictionary.GetSymbolImage returning unknown</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/symboldictionary-getsymbolimage-returning-unknown/m-p/383512#M4505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you mean by unknown image in this context? You mean that you get some image from SymbolDictionary but it's incorrect?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 10:15:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/symboldictionary-getsymbolimage-returning-unknown/m-p/383512#M4505</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2014-11-12T10:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: SymbolDictionary.GetSymbolImage returning unknown</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/symboldictionary-getsymbolimage-returning-unknown/m-p/383513#M4506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes. It always returns the yellow unknown empty symbol.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 14:48:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/symboldictionary-getsymbolimage-returning-unknown/m-p/383513#M4506</guid>
      <dc:creator>KeithMacIntyre</dc:creator>
      <dc:date>2014-11-12T14:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: SymbolDictionary.GetSymbolImage returning unknown</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/symboldictionary-getsymbolimage-returning-unknown/m-p/383514#M4507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've attached a sample project showing the problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Nov 2014 18:43:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/symboldictionary-getsymbolimage-returning-unknown/m-p/383514#M4507</guid>
      <dc:creator>KeithMacIntyre</dc:creator>
      <dc:date>2014-11-12T18:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: SymbolDictionary.GetSymbolImage returning unknown</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/symboldictionary-getsymbolimage-returning-unknown/m-p/383515#M4508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep, it's a bug. Thanks for reporting this Keith. I have logged issue as a bug and hopefully we will get it fixed soon. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 10:47:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/symboldictionary-getsymbolimage-returning-unknown/m-p/383515#M4508</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2014-11-13T10:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: SymbolDictionary.GetSymbolImage returning unknown</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/symboldictionary-getsymbolimage-returning-unknown/m-p/383516#M4509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's another way to do get the symbol if you need that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14158788917496507 jive_text_macro" jivemacro_uid="_14158788917496507"&gt;
&lt;P&gt;SymbolDictionary dictionary = new SymbolDictionary(SymbolDictionaryType.Mil2525c);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;IEnumerable&amp;lt;SymbolProperties&amp;gt; symbols = dictionary.FindSymbols(new List&amp;lt;string&amp;gt;() { "SHGPEVATM-" });&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;var symbolSource = symbols.First().GetImage(128, 128);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;JpegBitmapEncoder encoder = new JpegBitmapEncoder();&lt;/P&gt;
&lt;P&gt;encoder.Frames.Add(BitmapFrame.Create(symbolSource as WriteableBitmap));&lt;/P&gt;
&lt;P&gt;PictureMarkerSymbol symbol = new PictureMarkerSymbol();&lt;/P&gt;
&lt;P&gt;MemoryStream ms = new MemoryStream();&lt;/P&gt;
&lt;P&gt;encoder.Save(ms);&lt;/P&gt;
&lt;P&gt;symbol.SetSource(ms.ToArray());&lt;/P&gt;
&lt;P&gt;ms.Close();&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Graphic g = new Graphic(new MapPoint(0, 0), symbol);&lt;/P&gt;
&lt;P&gt;GraphicsLayer.Graphics.Add(g)&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 11:41:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/symboldictionary-getsymbolimage-returning-unknown/m-p/383516#M4509</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2014-11-13T11:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: SymbolDictionary.GetSymbolImage returning unknown</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/symboldictionary-getsymbolimage-returning-unknown/m-p/383517#M4510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Small update to this : Actually issue that is reported originally should be using "name" instead of "SicCode" when finding the symbol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c#" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14158791589743756 jive_text_macro" jivemacro_uid="_14158791589743756"&gt;
&lt;P&gt;WriteableBitmap image = dictionary.GetSymbolImage("Tank Medium H", 128, 128) as WriteableBitmap;&lt;/P&gt;


&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;returns symbol correctly but the symbol that you are seeing is returned when symbol is not found (ie. when trying to use SIC). I think that the bug here is that we don't tell that no results were found and return an image.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See my previous comment how to find symbols based on the SIC values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 11:51:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/symboldictionary-getsymbolimage-returning-unknown/m-p/383517#M4510</guid>
      <dc:creator>AnttiKajanus1</dc:creator>
      <dc:date>2014-11-13T11:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: SymbolDictionary.GetSymbolImage returning unknown</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/symboldictionary-getsymbolimage-returning-unknown/m-p/383518#M4511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using the other method in the previous version we would get a symbol returned with an echelon and/or mobility indicator.&amp;nbsp; It looks like to get the symbol we need we will have to pass in the first 10 characters of the symbol ID, then, get another image with the mobility or other modifiers and build the symbol ourselves.&amp;nbsp; It would be nice if the GetSymbolImage was implemented so we can get a fully formed symbol from the function with the full symbol ID&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 19:21:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/symboldictionary-getsymbolimage-returning-unknown/m-p/383518#M4511</guid>
      <dc:creator>KeithMacIntyre</dc:creator>
      <dc:date>2014-11-13T19:21:59Z</dc:date>
    </item>
  </channel>
</rss>

