<?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: LegendInfos in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/legendinfos/m-p/1022820#M6907</link>
    <description>&lt;P&gt;The San Diego Places is one layer; the data in the layer is symbolized using "Unique Values". &amp;nbsp;The LegendInfos represent those unique values and are what is drawn in the image I posted. &amp;nbsp;The web map used in the Legend example is &lt;A href="https://runtime.maps.arcgis.com/home/webmap/viewer.html?webmap=1966ef409a344d089b001df85332608f" target="_self"&gt;here&lt;/A&gt;. &amp;nbsp;You can take a look at the various layers, how they are symbolized and how they appear in the map's legend in the online map viewer.&lt;/P&gt;&lt;P&gt;The LegendInfo mechanism was designed to be displayed with the symbol/name given, so creating a composite symbol is not really standard.&lt;/P&gt;&lt;P&gt;The swatch should be created from the symbol property of the LegendInfo. &amp;nbsp;You can see that in the LegendViewController &lt;A href="https://github.com/Esri/arcgis-runtime-toolkit-ios/blob/5f1e65c772d1269dcdbc6cdfecbcd2e0adbd6a57/Toolkit/ArcGISToolkit/LegendViewController.swift#L155" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;If you're still seeing the error, you can send it to me along with an explanation/code snippet of what you're doing and I can take a look.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
    <pubDate>Tue, 02 Feb 2021 23:18:12 GMT</pubDate>
    <dc:creator>MarkDostal</dc:creator>
    <dc:date>2021-02-02T23:18:12Z</dc:date>
    <item>
      <title>LegendInfos</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/legendinfos/m-p/1022492#M6903</link>
      <description>&lt;P&gt;Two questions:&lt;/P&gt;&lt;P&gt;If a layer has more&amp;nbsp; than one legendInfos can we use the symbols in all the legendInfos to create&amp;nbsp; AGSCompositeSymbol and then swatch? or AGSCompositeSymbol is different?&lt;/P&gt;&lt;P&gt;If there are different type of layers, what is common way for get Symbol, e.g. map have&amp;nbsp;AGSArcGISMapImageLayer its legendInfos are 0. However when I use LegendViewController from one of your examples, it load the symbol.&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 11:33:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/legendinfos/m-p/1022492#M6903</guid>
      <dc:creator>smaawais</dc:creator>
      <dc:date>2021-02-02T11:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: LegendInfos</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/legendinfos/m-p/1022627#M6904</link>
      <description>&lt;P&gt;Thank you for your question! &amp;nbsp;It is possible to use the symbols in the legendInfos to create a composite symbol. &amp;nbsp;What would be the use case for doing that? &amp;nbsp; A&amp;nbsp;legendInfo represents one individual legend element, so combining their symbols may be confusing. &amp;nbsp;Example: each of the rows (Food, Fun, Design) in the image below is represented by a single legendInfo.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Legend.png" style="width: 165px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/5125i49ADC15371882285/image-size/large?v=v2&amp;amp;px=999" role="button" title="Legend.png" alt="Legend.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As for `&lt;SPAN&gt;AGSArcGISMapImageLayer`, each of it's sublayers is also "Loadable",&amp;nbsp;which means you need to load them explicitly in order to have their properties populated. &amp;nbsp;If you look in `LegendViewController.swift`, in the method &lt;A href="https://github.com/Esri/arcgis-runtime-toolkit-ios/blob/5f1e65c772d1269dcdbc6cdfecbcd2e0adbd6a57/Toolkit/ArcGISToolkit/LegendViewController.swift#L246" target="_self"&gt;loadIndividualLayer&lt;/A&gt;, it loads the layer, then calls&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-runtime-toolkit-ios/blob/5f1e65c772d1269dcdbc6cdfecbcd2e0adbd6a57/Toolkit/ArcGISToolkit/LegendViewController.swift#L257" target="_self"&gt;loadSublayersOrLegendInfos&lt;/A&gt;, which loads the sublayers. &amp;nbsp;Only after the sublayers are loaded does it call &lt;A href="https://github.com/Esri/arcgis-runtime-toolkit-ios/blob/5f1e65c772d1269dcdbc6cdfecbcd2e0adbd6a57/Toolkit/ArcGISToolkit/LegendViewController.swift#L272" target="_self"&gt;fetchLegendInfos&lt;/A&gt;&amp;nbsp;and get the legendInfos it uses to build the legend.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So I suspect if you explicitly load the sublayers before calling fetchLegendInfos, you should be OK.&lt;/P&gt;&lt;P&gt;Please let us know if you need more information or have more questions.&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 17:11:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/legendinfos/m-p/1022627#M6904</guid>
      <dc:creator>MarkDostal</dc:creator>
      <dc:date>2021-02-02T17:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: LegendInfos</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/legendinfos/m-p/1022769#M6906</link>
      <description>&lt;P&gt;Thanks Mark,&lt;/P&gt;&lt;P&gt;We were designing our own legend screen which have one image one left side of layer name. So we were thinking to create composite symbol from symbols in legendinfos of each layer, however it created swatch for one layer and was giving error for other.&lt;/P&gt;&lt;P&gt;Do you think its a good idea to create composite symbol from legendinfos of one layer? The example in your response, is San Diego Places one layer?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 21:33:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/legendinfos/m-p/1022769#M6906</guid>
      <dc:creator>smaawais</dc:creator>
      <dc:date>2021-02-02T21:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: LegendInfos</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/legendinfos/m-p/1022820#M6907</link>
      <description>&lt;P&gt;The San Diego Places is one layer; the data in the layer is symbolized using "Unique Values". &amp;nbsp;The LegendInfos represent those unique values and are what is drawn in the image I posted. &amp;nbsp;The web map used in the Legend example is &lt;A href="https://runtime.maps.arcgis.com/home/webmap/viewer.html?webmap=1966ef409a344d089b001df85332608f" target="_self"&gt;here&lt;/A&gt;. &amp;nbsp;You can take a look at the various layers, how they are symbolized and how they appear in the map's legend in the online map viewer.&lt;/P&gt;&lt;P&gt;The LegendInfo mechanism was designed to be displayed with the symbol/name given, so creating a composite symbol is not really standard.&lt;/P&gt;&lt;P&gt;The swatch should be created from the symbol property of the LegendInfo. &amp;nbsp;You can see that in the LegendViewController &lt;A href="https://github.com/Esri/arcgis-runtime-toolkit-ios/blob/5f1e65c772d1269dcdbc6cdfecbcd2e0adbd6a57/Toolkit/ArcGISToolkit/LegendViewController.swift#L155" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;If you're still seeing the error, you can send it to me along with an explanation/code snippet of what you're doing and I can take a look.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 23:18:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/legendinfos/m-p/1022820#M6907</guid>
      <dc:creator>MarkDostal</dc:creator>
      <dc:date>2021-02-02T23:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: LegendInfos</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/legendinfos/m-p/1022875#M6908</link>
      <description>&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;I dont get error creating swatch from single legendinfo symbol, the error i get is when i create a composite swatch. Following is the code, symbols is an array contains symbols from legendinfos&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;let compositeSymbol = AGSCompositeSymbol(symbols: symbols)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;compositeSymbol.createSwatch(completion: { (image, error) in&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;if let img = image {&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;print("Composite Legend image: \(img)")&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;self.layerLegend.append(img)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;self.delegate?.legendUpdated(images: self.layerLegend)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;} else {&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;print("Composite Legend Image error: \(error?.localizedDescription)")&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;})&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&amp;nbsp;The error i get is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;STRONG&gt;&lt;I&gt;ArcGIS Runtime Error Occurred. Set a breakpoint on C++ exceptions to see the original callstack and context for this error:&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &lt;/SPAN&gt;Error Domain=com.esri.arcgis.runtime.error Code=2 "Invalid argument" UserInfo={NSLocalizedFailureReason=Invalid geometry type., NSLocalizedDescription=Invalid argument, Additional Message=Invalid geometry type.&lt;/I&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 03:21:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/legendinfos/m-p/1022875#M6908</guid>
      <dc:creator>smaawais</dc:creator>
      <dc:date>2021-02-03T03:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: LegendInfos</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/legendinfos/m-p/1023957#M6914</link>
      <description>&lt;P&gt;Thank you for the further explanation and the code. &amp;nbsp;The error is `Invalid geometry type`. &amp;nbsp;My guess is that you are mixing point, line, and polygons symbols in your composite symbol. &amp;nbsp;They all need to be the same geometry type when added to the composite symbol. &amp;nbsp;Please double-check the symbol types (point/line/fill) that get added to the composite symbol.&lt;/P&gt;&lt;P&gt;Let me know how that goes,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 17:54:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/legendinfos/m-p/1023957#M6914</guid>
      <dc:creator>MarkDostal</dc:creator>
      <dc:date>2021-02-05T17:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: LegendInfos</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/legendinfos/m-p/1024680#M6915</link>
      <description>&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;Thanks for your response. May the thats the reason the creating composite symbol giving error, have not explored it as the team have decided to go on with showing the legend images individually base on your first comment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Feb 2021 23:03:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/legendinfos/m-p/1024680#M6915</guid>
      <dc:creator>smaawais</dc:creator>
      <dc:date>2021-02-08T23:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: LegendInfos</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/legendinfos/m-p/1024892#M6918</link>
      <description>&lt;P&gt;Ok, great. &amp;nbsp;Let us know if you run into any more issues or have additional questions!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 15:22:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/legendinfos/m-p/1024892#M6918</guid>
      <dc:creator>MarkDostal</dc:creator>
      <dc:date>2021-02-09T15:22:25Z</dc:date>
    </item>
  </channel>
</rss>

