Why does calling LoadAsync() on an ArcGISMapImageSublayer make it draw differently and in this case draw worse/incorrectly? Is this expected behavior? I was calling load because I wanted access to some of the information in the MapServiceSubLayerInfo class for use in another part of my app.
See before1.png and after1.png attached below. The black blobs seen in after1.png shouldn't be there. Also, the layer stops drawing all together when zooming in. See before2.png and after2.png attached below.
Hi,
To round out this thread - this issue was resolved in the v100.5 release of ArcGIS Runtime SDK for .NET.
Cheers
Mike
LoadAsync on ArcGISMapImageSublayer should not have any effect on how ArcGISMapImageLayer is rendered, it only retrieves metadata. Are you by any chance rendering the sublayer as FeatureLayer?
Can you share some repro code? Thanks.
You can subscribe to GeoView.LayerViewStateChanged to find the current status of the layer when it becomes invisible, see if LayerViewStatus is OutOfScale, NotVisible or if there's an error associated with it.
The layer(s) in question were not added to the map individually as feature layers. I'm just traversing the sublayers of the dynamic map service can calling LoadAsync to get metadata such as capabilities. I've edited my original post to include a .zip containing repro code. Please check out the readme.txt in the .zip for more info. Thanks.
Thank you for sharing your repro sample. I have logged an issue. I think it's a valid bug that loading sub layers changed the symbology.
To workaround this issue, after you've loaded the sub layer to retrieve metadata, you can reset sub layers such that it does not pass along dynamicLayer parameter in the image request. This should have only happened if you re-arranged sublayers or given a different source.
<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN>ArcGISMapImageLayer<SPAN class="punctuation token">)</SPAN>e<SPAN class="punctuation token">.</SPAN>Layer<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">ResetSublayers</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
Thanks for your feedback, looking for more info about ResetSublayers().
My scenario is that I have a dynamic map service with per request modification of layer order and symbology enabled and all sublayers are toggled to be not visible. Then, I have a web map which loads this service, but the web map specifies that some sublayers are visible, others not visible and others have been removed completely from the webmap. The runtime app has loaded this webmap then calls ResetSublayers(). What should I expect to happen with respect to drawing behavior. The API documentation doesn't really give me a clue of what would happen in this non-trivial but real-world scenario.
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.