<?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: AGSLayerViewState State 6 in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agslayerviewstate-state-6/m-p/1122407#M7237</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;We already handle active/notVisible/outOfScale/loading/error/warning (0 to 5)&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Actually they are not 0 to 5, but 1, 2, 4, 8, 16 and 32 (&lt;EM&gt;&lt;SPAN class=""&gt;1&lt;/SPAN&gt; &amp;lt;&amp;lt; &lt;/EM&gt;&lt;SPAN class=""&gt;&lt;EM&gt;0&lt;/EM&gt; to &lt;EM&gt;1 &amp;lt;&amp;lt; 5&lt;/EM&gt;&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;The raw values of&amp;nbsp;&lt;SPAN&gt;&lt;EM&gt;AGSLayerViewState&lt;/EM&gt; are&amp;nbsp;&lt;EM&gt;NS_OPTIONS&lt;/EM&gt;, or&amp;nbsp;&lt;A title="OptionSet" href="https://developer.apple.com/documentation/swift/optionset" target="_blank" rel="noopener"&gt;&lt;EM&gt;OptionSet&lt;/EM&gt;&lt;/A&gt;, which allows multiple options/states to be returned at the same time.&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;It seems that somehow the AGSLayerViewState is set to 6.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Consider this snippet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="swift"&gt;let states: [AGSLayerViewStatus] = [.active, .notVisible, .outOfScale, .loading, .error, .warning]
states.forEach { state in
    print(state.rawValue)
}
// 1, 2, 4, 8, 16, 32

print(AGSLayerViewStatus.notVisible.rawValue | AGSLayerViewStatus.outOfScale.rawValue)
// 6&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When there are multiple states involved, you'll see a combination of values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a related snippet that may help:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-ios/blob/main/arcgis-ios-sdk-samples/Maps/Display%20layer%20view%20state/LayerStatusViewController.swift#L72" target="_blank" rel="noopener"&gt;https://github.com/Esri/arcgis-runtime-samples-ios/blob/main/arcgis-ios-sdk-samples/Maps/Display%20layer%20view%20state/LayerStatusViewController.swift#L72&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Dec 2021 01:24:39 GMT</pubDate>
    <dc:creator>Ting</dc:creator>
    <dc:date>2021-12-03T01:24:39Z</dc:date>
    <item>
      <title>AGSLayerViewState State 6</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agslayerviewstate-state-6/m-p/1122401#M7236</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;It seems that somehow the AGSLayerViewState is set to 6.&lt;/P&gt;&lt;P&gt;We already handle active/notVisible/outOfScale/loading/error/warning (0 to 5).&lt;/P&gt;&lt;P&gt;I've checked the documentation &lt;A href="https://developers.arcgis.com/ios/api-reference/_a_g_s_layer_view_state_8h.html#ae64e23b127ffb327986163f4b522cdfe" target="_blank"&gt;https://developers.arcgis.com/ios/api-reference/_a_g_s_layer_view_state_8h.html#ae64e23b127ffb327986163f4b522cdfe&lt;/A&gt; and there are no other options.&lt;/P&gt;&lt;P&gt;Do you have any ideas what would&amp;nbsp; that mean?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 00:04:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agslayerviewstate-state-6/m-p/1122401#M7236</guid>
      <dc:creator>marius</dc:creator>
      <dc:date>2021-12-03T00:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: AGSLayerViewState State 6</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agslayerviewstate-state-6/m-p/1122407#M7237</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;P&gt;We already handle active/notVisible/outOfScale/loading/error/warning (0 to 5)&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Actually they are not 0 to 5, but 1, 2, 4, 8, 16 and 32 (&lt;EM&gt;&lt;SPAN class=""&gt;1&lt;/SPAN&gt; &amp;lt;&amp;lt; &lt;/EM&gt;&lt;SPAN class=""&gt;&lt;EM&gt;0&lt;/EM&gt; to &lt;EM&gt;1 &amp;lt;&amp;lt; 5&lt;/EM&gt;&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;The raw values of&amp;nbsp;&lt;SPAN&gt;&lt;EM&gt;AGSLayerViewState&lt;/EM&gt; are&amp;nbsp;&lt;EM&gt;NS_OPTIONS&lt;/EM&gt;, or&amp;nbsp;&lt;A title="OptionSet" href="https://developer.apple.com/documentation/swift/optionset" target="_blank" rel="noopener"&gt;&lt;EM&gt;OptionSet&lt;/EM&gt;&lt;/A&gt;, which allows multiple options/states to be returned at the same time.&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;It seems that somehow the AGSLayerViewState is set to 6.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Consider this snippet&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="swift"&gt;let states: [AGSLayerViewStatus] = [.active, .notVisible, .outOfScale, .loading, .error, .warning]
states.forEach { state in
    print(state.rawValue)
}
// 1, 2, 4, 8, 16, 32

print(AGSLayerViewStatus.notVisible.rawValue | AGSLayerViewStatus.outOfScale.rawValue)
// 6&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When there are multiple states involved, you'll see a combination of values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a related snippet that may help:&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-runtime-samples-ios/blob/main/arcgis-ios-sdk-samples/Maps/Display%20layer%20view%20state/LayerStatusViewController.swift#L72" target="_blank" rel="noopener"&gt;https://github.com/Esri/arcgis-runtime-samples-ios/blob/main/arcgis-ios-sdk-samples/Maps/Display%20layer%20view%20state/LayerStatusViewController.swift#L72&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 01:24:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agslayerviewstate-state-6/m-p/1122407#M7237</guid>
      <dc:creator>Ting</dc:creator>
      <dc:date>2021-12-03T01:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: AGSLayerViewState State 6</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agslayerviewstate-state-6/m-p/1122413#M7238</link>
      <description>&lt;P&gt;Thanks for clarifying that. I've handled them as "switch:", hence the error.&lt;/P&gt;&lt;P&gt;I'll convert it to the example code.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 02:27:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agslayerviewstate-state-6/m-p/1122413#M7238</guid>
      <dc:creator>marius</dc:creator>
      <dc:date>2021-12-03T02:27:38Z</dc:date>
    </item>
  </channel>
</rss>

