<?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 Get symbol for a FeatureTemplate in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/get-symbol-for-a-featuretemplate/m-p/27219#M299</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering if there is a way to get the symbol for a FeatureTemplate?&amp;nbsp; I'm trying to build a grid of feature templates for the user to choose from when editing a map layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the old WPF API it used to work this way...&lt;/P&gt;&lt;P&gt;featuretemplate.GetSymbol(layer.Renderer)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't been able to find anything that appears to be equivalent in the docs or object model.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 May 2018 23:10:13 GMT</pubDate>
    <dc:creator>MarkCollins</dc:creator>
    <dc:date>2018-05-03T23:10:13Z</dc:date>
    <item>
      <title>Get symbol for a FeatureTemplate</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/get-symbol-for-a-featuretemplate/m-p/27219#M299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering if there is a way to get the symbol for a FeatureTemplate?&amp;nbsp; I'm trying to build a grid of feature templates for the user to choose from when editing a map layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the old WPF API it used to work this way...&lt;/P&gt;&lt;P&gt;featuretemplate.GetSymbol(layer.Renderer)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't been able to find anything that appears to be equivalent in the docs or object model.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2018 23:10:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/get-symbol-for-a-featuretemplate/m-p/27219#M299</guid>
      <dc:creator>MarkCollins</dc:creator>
      <dc:date>2018-05-03T23:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Get symbol for a FeatureTemplate</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/get-symbol-for-a-featuretemplate/m-p/27220#M300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the &lt;A href="https://developers.arcgis.com/net/latest/wpf/api-reference/" rel="nofollow noopener noreferrer" target="_blank"&gt;Renderer.GetSymbol&lt;/A&gt; method for this. That requires a GeoElement, which you can create from the feature template's PrototypeAttributes.&amp;nbsp; So the code would be something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;// We need a layer to access the renderer&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; featureLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;FeatureLayer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Uri&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fsampleserver6.arcgisonline.com%2Farcgis%2Frest%2Fservices%2FCommercialDamageAssessment%2FFeatureServer%2F0" target="_blank"&gt;https://sampleserver6.arcgisonline.com/arcgis/rest/services/CommercialDamageAssessment/FeatureServer/0&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;// The layer needs to be loaded to make its metadata accessible&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;await&lt;/SPAN&gt; featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;LoadAsync&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;// With this particular service, the feature templates are enclosed in feature types,&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;// so get the feature type first.&amp;nbsp; Some services have the feature templates available&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;// directly off of the layer info.&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; featureType &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ServiceFeatureTable&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FeatureTable&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;LayerInfo&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;FeatureTypes&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;First&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;// Get the feature template&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; featureTemplate &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; featureType&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Templates&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;First&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;// Create a graphic with the feature template's attributes&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; prototypeGraphic &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Graphic&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;featureTemplate&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;PrototypeAttributes&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;// Use the graphic to get the symbol from the renderer&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; featureTemplateSymbol &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Renderer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetSymbol&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;prototypeGraphic&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:06:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/get-symbol-for-a-featuretemplate/m-p/27220#M300</guid>
      <dc:creator>RichZwaap</dc:creator>
      <dc:date>2021-12-10T21:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get symbol for a FeatureTemplate</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/get-symbol-for-a-featuretemplate/m-p/27221#M301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This was exactly what I was looking for and it works great. Thanks for the help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 17:51:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/get-symbol-for-a-featuretemplate/m-p/27221#M301</guid>
      <dc:creator>MarkCollins</dc:creator>
      <dc:date>2018-05-04T17:51:54Z</dc:date>
    </item>
  </channel>
</rss>

