<?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: Remove graphics which created by a widget when widget being closed in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-graphics-which-created-by-a-widget-when/m-p/404868#M37270</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If u use graphicslayer. is graphicslayer.clear();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u use map.graphics is map.graphics.clear();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u use layers, map.removeAllLayers() for all of them or removeLayer(urLayer) to remove the desired layers that u added in the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Feb 2018 14:29:17 GMT</pubDate>
    <dc:creator>EvelynHernandez</dc:creator>
    <dc:date>2018-02-02T14:29:17Z</dc:date>
    <item>
      <title>Remove graphics which created by a widget when widget being closed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-graphics-which-created-by-a-widget-when/m-p/404867#M37269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Added DirectLineMeasurement3D widget in to sceneview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a toggle widget button. And button code below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mySceneview.ui.remove(measureWidget);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is removing widget from sceneview but drawings stays on screen. I can't clear all graphics because of sceneview has another graphics.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i remove graphics which created by&amp;nbsp; a widget when widget being closed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks inadvance&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 06:55:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-graphics-which-created-by-a-widget-when/m-p/404867#M37269</guid>
      <dc:creator>TubaKumbara</dc:creator>
      <dc:date>2018-02-02T06:55:18Z</dc:date>
    </item>
    <item>
      <title>Re: Remove graphics which created by a widget when widget being closed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-graphics-which-created-by-a-widget-when/m-p/404868#M37270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If u use graphicslayer. is graphicslayer.clear();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u use map.graphics is map.graphics.clear();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if u use layers, map.removeAllLayers() for all of them or removeLayer(urLayer) to remove the desired layers that u added in the map.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 14:29:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-graphics-which-created-by-a-widget-when/m-p/404868#M37270</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2018-02-02T14:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: Remove graphics which created by a widget when widget being closed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-graphics-which-created-by-a-widget-when/m-p/404869#M37271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tuba,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;It has not been documented but there is a clearMeasurement method.&lt;/P&gt;&lt;PRE class="language-javascript line-numbers"&gt;&lt;CODE&gt;measureWidget&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;clearMeasurement&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 14:48:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-graphics-which-created-by-a-widget-when/m-p/404869#M37271</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2018-02-02T14:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Remove graphics which created by a widget when widget being closed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-graphics-which-created-by-a-widget-when/m-p/404870#M37272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the answer.&lt;/P&gt;&lt;P&gt;yes widget.clearMeasurement is solved problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But&lt;/P&gt;&lt;P&gt;Mouse cursor still displaying as "plus" figure (as if widget is opened) and still continuing drawing measure graphic even after close and clear widget.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And another question,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can we get a list for added widgets?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks inadvance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 14:58:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-graphics-which-created-by-a-widget-when/m-p/404870#M37272</guid>
      <dc:creator>TubaKumbara</dc:creator>
      <dc:date>2018-02-02T14:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Remove graphics which created by a widget when widget being closed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-graphics-which-created-by-a-widget-when/m-p/404871#M37273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tuba,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Then you need to destroy the widget as well:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;measureWidget&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;clearMeasurement&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
view&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ui&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;remove&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;measureWidget&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
measureWidget&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;destroy&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your second question look here:&lt;/P&gt;&lt;P&gt;&lt;A class="link-bare" href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-DefaultUI.html#components" title="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-DefaultUI.html#components" rel="nofollow noopener noreferrer" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-DefaultUI.html#components&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:26:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-graphics-which-created-by-a-widget-when/m-p/404871#M37273</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-11T18:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Remove graphics which created by a widget when widget being closed</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-graphics-which-created-by-a-widget-when/m-p/404872#M37274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robert, your answer has been really helpful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Feb 2018 15:24:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/remove-graphics-which-created-by-a-widget-when/m-p/404872#M37274</guid>
      <dc:creator>TubaKumbara</dc:creator>
      <dc:date>2018-02-02T15:24:28Z</dc:date>
    </item>
  </channel>
</rss>

