<?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: Add legend info for map layer in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/add-legend-info-for-map-layer/m-p/400662#M2004</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'll probably need to handle KML Layers as a special case in your TOC, as they function differently than most other layers. The concept of LegendInfos doesn't really apply to them. TO build a TOC, you will need to go down the the node&amp;nbsp;hierarchy (starting from the dataset rootNodes and using the container or networklink childNodes to go down) and use the KmlNode.UXIcon + KmlNode.Name (for example) to create a TOC entry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Nov 2019 18:36:58 GMT</pubDate>
    <dc:creator>LucasDanzinger</dc:creator>
    <dc:date>2019-11-06T18:36:58Z</dc:date>
    <item>
      <title>Add legend info for map layer</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/add-legend-info-for-map-layer/m-p/400661#M2003</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am creating a number of kml layers and adding them async to my map.&amp;nbsp; The problem is, is that I can't figure out how to create their legend info so that they can be displayed on my legend to the map.&amp;nbsp; I want to do something like this, but can't figure out how to get anything to work at all.&amp;nbsp; i know I need to add to the legendinfos of the layer or the map itself, but hit a roadblock.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This append below doesn't work at all, but shows what I am trying to do.&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="keyword token"&gt;var&lt;/SPAN&gt; newKMLLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; ArcGISRuntimeEnvironment&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;createObject&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"KmlLayer"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                                &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                                                                    dataset&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; newKMLDataset&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                                    id&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; kmlLayer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                                    description&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; inName&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                                    layerId&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"LayerID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                                    name&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; inName&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                                    maxScale&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                                    minScale&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                                                    visible&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&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;
newKMLLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;legendInfos&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;append&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
                                   &lt;SPAN class="string token"&gt;"layerName"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; inName&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                                   &lt;SPAN class="string token"&gt;"symbolURL"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"URL"&lt;/SPAN&gt;                                 
                                   
                                &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

        mapViewFieldSelected&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;map&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;operationalLayers&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;append&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;newKMLLayer&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;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:17:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/add-legend-info-for-map-layer/m-p/400661#M2003</guid>
      <dc:creator>MKa</dc:creator>
      <dc:date>2021-12-11T18:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Add legend info for map layer</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/add-legend-info-for-map-layer/m-p/400662#M2004</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'll probably need to handle KML Layers as a special case in your TOC, as they function differently than most other layers. The concept of LegendInfos doesn't really apply to them. TO build a TOC, you will need to go down the the node&amp;nbsp;hierarchy (starting from the dataset rootNodes and using the container or networklink childNodes to go down) and use the KmlNode.UXIcon + KmlNode.Name (for example) to create a TOC entry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Nov 2019 18:36:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/add-legend-info-for-map-layer/m-p/400662#M2004</guid>
      <dc:creator>LucasDanzinger</dc:creator>
      <dc:date>2019-11-06T18:36:58Z</dc:date>
    </item>
  </channel>
</rss>

