<?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: AGSGraphicsOverlay and multithreading in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgraphicsoverlay-and-multithreading/m-p/15317#M206</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suspect that the issue was caused when I tried to remove a graphic which isn't on the&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;graphicsOverlay. I remove and add back a graphic which is selected to make it appear on the top of all graphics. Simple&amp;nbsp;&lt;SPAN&gt;graphicsOverlay.contains(graphic) seems to be helping me avoiding the error.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is about `&lt;SPAN style="background-color: #ffffff;"&gt;graphicsOverlay&lt;/SPAN&gt;&lt;SPAN class="" style="background-color: #ffffff; border: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;graphics&lt;/SPAN&gt;&lt;SPAN class="" style="background-color: #ffffff; border: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="background-color: #ffffff; border: 0px;"&gt;addObjects()&lt;/SPAN&gt;`, the graphicsOverlay is already added to AGSMapView and I am manipulating data on background thread and then call&amp;nbsp;&lt;SPAN&gt;`&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;graphicsOverlay&lt;/SPAN&gt;&lt;SPAN class="" style="background-color: #ffffff; border: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;graphics&lt;/SPAN&gt;&lt;SPAN class="" style="background-color: #ffffff; border: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="background-color: #ffffff; border: 0px;"&gt;addObjects()&lt;/SPAN&gt;&lt;SPAN&gt;` on the same thread. Can it cause issues? I haven't seen any but my tests can be&amp;nbsp;insufficient.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And is it ok to read existing graphics `&lt;SPAN style="background-color: #ffffff;"&gt;graphicsOverlay&lt;/SPAN&gt;&lt;SPAN class="" style="background-color: #ffffff; border: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;graphics&lt;/SPAN&gt;` from a background thread?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Nov 2017 17:27:40 GMT</pubDate>
    <dc:creator>NikolayYekimov</dc:creator>
    <dc:date>2017-11-30T17:27:40Z</dc:date>
    <item>
      <title>AGSGraphicsOverlay and multithreading</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgraphicsoverlay-and-multithreading/m-p/15315#M204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;I am using&amp;nbsp;&lt;/SPAN&gt;AGSGraphicsOverlay to display custom AGSGraphics. The graphics' manipulation logic I want to put into an async thread. So what are the general rules regarding usage of arcgis core objects: layers, graphics, map in multithreading environment? I am getting rarely&amp;nbsp;&lt;SPAN class=""&gt;&lt;STRONG&gt;com.esri.arcgis.runtime.error Code=24,&amp;nbsp;&lt;/STRONG&gt;and trying to figure out all rules to avoid it.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 20:33:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgraphicsoverlay-and-multithreading/m-p/15315#M204</guid>
      <dc:creator>NikolayYekimov</dc:creator>
      <dc:date>2017-10-19T20:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: AGSGraphicsOverlay and multithreading</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgraphicsoverlay-and-multithreading/m-p/15316#M205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello and thank you for your question! &amp;nbsp;In general when performing async/multithreaded operation, the main rule is to&amp;nbsp;make sure all display/map interactions happen on the main thread. &amp;nbsp;I don't see any issues doing some background/async processing of graphics and adding them to a graphics overlay, then when complete, adding the overlay to the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have any more information about your "Code=24" error or maybe a call stack? &amp;nbsp;That error seems to indicate that an object was assigned to more than one parent object, which is not allowed; example: &amp;nbsp;a single layer object being added to two map views, or maybe a single graphics object being added to two or more graphic overlays.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have more information, I'm happy to take a look at it. &amp;nbsp;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Nov 2017 18:09:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgraphicsoverlay-and-multithreading/m-p/15316#M205</guid>
      <dc:creator>MarkDostal</dc:creator>
      <dc:date>2017-11-28T18:09:50Z</dc:date>
    </item>
    <item>
      <title>Re: AGSGraphicsOverlay and multithreading</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgraphicsoverlay-and-multithreading/m-p/15317#M206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suspect that the issue was caused when I tried to remove a graphic which isn't on the&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;graphicsOverlay. I remove and add back a graphic which is selected to make it appear on the top of all graphics. Simple&amp;nbsp;&lt;SPAN&gt;graphicsOverlay.contains(graphic) seems to be helping me avoiding the error.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is about `&lt;SPAN style="background-color: #ffffff;"&gt;graphicsOverlay&lt;/SPAN&gt;&lt;SPAN class="" style="background-color: #ffffff; border: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;graphics&lt;/SPAN&gt;&lt;SPAN class="" style="background-color: #ffffff; border: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="background-color: #ffffff; border: 0px;"&gt;addObjects()&lt;/SPAN&gt;`, the graphicsOverlay is already added to AGSMapView and I am manipulating data on background thread and then call&amp;nbsp;&lt;SPAN&gt;`&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;graphicsOverlay&lt;/SPAN&gt;&lt;SPAN class="" style="background-color: #ffffff; border: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;graphics&lt;/SPAN&gt;&lt;SPAN class="" style="background-color: #ffffff; border: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="" style="background-color: #ffffff; border: 0px;"&gt;addObjects()&lt;/SPAN&gt;&lt;SPAN&gt;` on the same thread. Can it cause issues? I haven't seen any but my tests can be&amp;nbsp;insufficient.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;And is it ok to read existing graphics `&lt;SPAN style="background-color: #ffffff;"&gt;graphicsOverlay&lt;/SPAN&gt;&lt;SPAN class="" style="background-color: #ffffff; border: 0px;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;graphics&lt;/SPAN&gt;` from a background thread?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 17:27:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgraphicsoverlay-and-multithreading/m-p/15317#M206</guid>
      <dc:creator>NikolayYekimov</dc:creator>
      <dc:date>2017-11-30T17:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: AGSGraphicsOverlay and multithreading</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgraphicsoverlay-and-multithreading/m-p/15318#M207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it is OK to use a&amp;nbsp;background thread to process, add and read graphics to/from an overlay. &amp;nbsp;In fact, there is a performance boost to doing it that way as opposed to on the main thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Nov 2017 18:27:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/agsgraphicsoverlay-and-multithreading/m-p/15318#M207</guid>
      <dc:creator>MarkDostal</dc:creator>
      <dc:date>2017-11-30T18:27:16Z</dc:date>
    </item>
  </channel>
</rss>

