<?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 ArcGISDynamicMapServiceLayer VisibleLayers throw exception on visibility changes in .NET Maps SDK Questions</title>
    <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgisdynamicmapservicelayer-visiblelayers-throw/m-p/759368#M9491</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;We are experiencing sporadic un-handled exception that occurs while loading MPK with multiple layers layer approx. 400+ layers.&lt;/P&gt;&lt;P&gt;During this process we are restoring VisibleLayers by adding or removing id's to be visible or hidden.&lt;/P&gt;&lt;P&gt;If&amp;nbsp;comment out '#VisibleLayers.Remove(id)' thant this not happen anymore, but we requires it as we want to change layer and it's sub-layers visibility that has&amp;nbsp;to be&amp;nbsp;controlled by user needs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are running ArcGIS Runtime&amp;nbsp;10.2.7 version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception:&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) at System.Collections.Generic.List`1.Enumerator.MoveNextRare() at System.Collections.Generic.List`1.Enumerator.MoveNext() at System.String.Join&lt;T&gt;(String separator, IEnumerable`1 values) at Esri.ArcGISRuntime.Layers.ArcGISDynamicMapServiceLayer.GetImageExportParameters(ImageParameters properties) at Esri.ArcGISRuntime.Layers.ArcGISDynamicMapServiceLayer.GetImageAsync(ImageParameters properties, CancellationToken cancellationToken) at Esri.ArcGISRuntime.Layers.DynamicCallbackHandler.RequestImage(Int32 width, Int32 height, CoreEnvelope2D core_env, CoreSpatialReference s_ref, Single dpi, Double angle, Boolean wrapAround, Boolean hasTimeExtent, Int64 startTime, Int64 endTime) at RuntimeCoreNet.CoreDynamicLayer.&amp;lt;&amp;gt;c__DisplayClass2.&amp;lt;.ctor&amp;gt;b__0(Int32 width, Int32 height, CoreEnvelope2D extent, IntPtr pNativeSpatialReference, Single dpi, Double angle, Boolean wrapAround, Boolean useTime, Int64 startTime, Int64 endTime)&lt;/T&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 31 Aug 2016 21:57:40 GMT</pubDate>
    <dc:creator>AlexanderLitvak</dc:creator>
    <dc:date>2016-08-31T21:57:40Z</dc:date>
    <item>
      <title>ArcGISDynamicMapServiceLayer VisibleLayers throw exception on visibility changes</title>
      <link>https://community.esri.com/t5/net-maps-sdk-questions/arcgisdynamicmapservicelayer-visiblelayers-throw/m-p/759368#M9491</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;We are experiencing sporadic un-handled exception that occurs while loading MPK with multiple layers layer approx. 400+ layers.&lt;/P&gt;&lt;P&gt;During this process we are restoring VisibleLayers by adding or removing id's to be visible or hidden.&lt;/P&gt;&lt;P&gt;If&amp;nbsp;comment out '#VisibleLayers.Remove(id)' thant this not happen anymore, but we requires it as we want to change layer and it's sub-layers visibility that has&amp;nbsp;to be&amp;nbsp;controlled by user needs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are running ArcGIS Runtime&amp;nbsp;10.2.7 version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exception:&lt;/P&gt;&lt;P&gt;--------------------------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;P&gt;System.InvalidOperationException: Collection was modified; enumeration operation may not execute. at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource) at System.Collections.Generic.List`1.Enumerator.MoveNextRare() at System.Collections.Generic.List`1.Enumerator.MoveNext() at System.String.Join&lt;T&gt;(String separator, IEnumerable`1 values) at Esri.ArcGISRuntime.Layers.ArcGISDynamicMapServiceLayer.GetImageExportParameters(ImageParameters properties) at Esri.ArcGISRuntime.Layers.ArcGISDynamicMapServiceLayer.GetImageAsync(ImageParameters properties, CancellationToken cancellationToken) at Esri.ArcGISRuntime.Layers.DynamicCallbackHandler.RequestImage(Int32 width, Int32 height, CoreEnvelope2D core_env, CoreSpatialReference s_ref, Single dpi, Double angle, Boolean wrapAround, Boolean hasTimeExtent, Int64 startTime, Int64 endTime) at RuntimeCoreNet.CoreDynamicLayer.&amp;lt;&amp;gt;c__DisplayClass2.&amp;lt;.ctor&amp;gt;b__0(Int32 width, Int32 height, CoreEnvelope2D extent, IntPtr pNativeSpatialReference, Single dpi, Double angle, Boolean wrapAround, Boolean useTime, Int64 startTime, Int64 endTime)&lt;/T&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Aug 2016 21:57:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/net-maps-sdk-questions/arcgisdynamicmapservicelayer-visiblelayers-throw/m-p/759368#M9491</guid>
      <dc:creator>AlexanderLitvak</dc:creator>
      <dc:date>2016-08-31T21:57:40Z</dc:date>
    </item>
  </channel>
</rss>

