<?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: Clear Overlay in mapView in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/clear-overlay-in-mapview/m-p/862919#M4838</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich, instead use the maptool AddOverlay (and AddOverlayAsync) methods. Any graphics added to the overlay will be disposed when the tool is deactivated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic9990.html"&gt;http://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic9990.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Feb 2017 17:36:33 GMT</pubDate>
    <dc:creator>CharlesMacleod</dc:creator>
    <dc:date>2017-02-13T17:36:33Z</dc:date>
    <item>
      <title>Clear Overlay in mapView</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/clear-overlay-in-mapview/m-p/862918#M4837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a tool that gets map coordinates from a mouse click and then does some work. In code&amp;nbsp;add a&amp;nbsp;marker symbol at the location the person clicked. The user may click multiple times prior to exiting the tool. On exiting I would like the overlay to be cleared.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To add the points I'm doing this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; disposable = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;await&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;QueuedTask&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.Run(() =&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: Consolas; font-size: small;"&gt;return&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; mapView.AddOverlay(myPoint,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;SymbolFactory&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.ConstructPointSymbol(&lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;ColorFactory&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.CreateRGBColor(255,255,0), 10.0, &lt;/SPAN&gt;&lt;SPAN style="color: #2b91af; font-family: Consolas; font-size: small;"&gt;SimpleMarkerStyle&lt;/SPAN&gt;&lt;SPAN style="font-family: Consolas; font-size: small;"&gt;.Cross).MakeSymbolReference());&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I need to keep track of all the disposable vars (perhapse in an array) to do:&lt;/P&gt;&lt;P&gt;disposable.Dispose();&lt;/P&gt;&lt;P&gt;for each maker?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I would like is a mapView.ClearOverlayAsync() command similar to&amp;nbsp; the existing&lt;/P&gt;&lt;P&gt;mapView.ClearSketchAsync();.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideas?&lt;/P&gt;&lt;P&gt;Rich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Feb 2017 00:04:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/clear-overlay-in-mapview/m-p/862918#M4837</guid>
      <dc:creator>RichardDaniels</dc:creator>
      <dc:date>2017-02-11T00:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Clear Overlay in mapView</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/clear-overlay-in-mapview/m-p/862919#M4838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rich, instead use the maptool AddOverlay (and AddOverlayAsync) methods. Any graphics added to the overlay will be disposed when the tool is deactivated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic9990.html"&gt;http://pro.arcgis.com/en/pro-app/sdk/api-reference/#topic9990.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2017 17:36:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/clear-overlay-in-mapview/m-p/862919#M4838</guid>
      <dc:creator>CharlesMacleod</dc:creator>
      <dc:date>2017-02-13T17:36:33Z</dc:date>
    </item>
  </channel>
</rss>

