<?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 How to delete line ? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-delete-line/m-p/97034#M8905</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;i am drawing line using this code reference from &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var myLine ={geometry:{"paths":[[[-91.40625,6.328125],[6.328125,19.3359375]]],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; "spatialReference":{"wkid":4326}},&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; "symbol":{"color":[0,0,0,255],"width":1,"type":"esriSLS","style":"esriSLSSolid"}};&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var gra= new esri.Graphic(myLine);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.graphics.add(gra);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can i delete the line if i am trying to draw in above mention way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The samples for deleting graphics method is not clear if we are drawing using inputs parameters. Can some one help us through code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Nov 2010 06:21:09 GMT</pubDate>
    <dc:creator>zeeshanbhatti</dc:creator>
    <dc:date>2010-11-24T06:21:09Z</dc:date>
    <item>
      <title>How to delete line ?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-delete-line/m-p/97034#M8905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;i am drawing line using this code reference from &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;var myLine ={geometry:{"paths":[[[-91.40625,6.328125],[6.328125,19.3359375]]],&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; "spatialReference":{"wkid":4326}},&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; "symbol":{"color":[0,0,0,255],"width":1,"type":"esriSLS","style":"esriSLSSolid"}};&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var gra= new esri.Graphic(myLine);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.graphics.add(gra);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can i delete the line if i am trying to draw in above mention way.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The samples for deleting graphics method is not clear if we are drawing using inputs parameters. Can some one help us through code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 06:21:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-delete-line/m-p/97034#M8905</guid>
      <dc:creator>zeeshanbhatti</dc:creator>
      <dc:date>2010-11-24T06:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete line ?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-delete-line/m-p/97035#M8906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;i dont know of a delete function for objects in javascript, but you might try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var gra= new esri.Graphic(myLine);
map.graphics.add(gra);

gra.hide(); // hide the graphic
gra=null;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;setting it to null 'should' let the js engine know that the object is available for garbage collection, whether it gets collected or not.. who knows.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:05:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-delete-line/m-p/97035#M8906</guid>
      <dc:creator>timgogl</dc:creator>
      <dc:date>2021-12-11T06:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete line ?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-delete-line/m-p/97036#M8907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;well, this is why i like to read through the forums here, i get to learn new things....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;looking at this post: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/17871-Trouble-with-routing?p=57167&amp;amp;posted=1#post57167"&gt;http://forums.arcgis.com/threads/17871-Trouble-with-routing?p=57167&amp;amp;posted=1#post57167&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i noticed this user using a remove() method on a graphics object.... so that maybe what you need to use.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;heh. ah.. just found the documentation, its under GraphicsLayer, not graphics.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jsapi_start.htm"&gt;http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jsapi_start.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 15:20:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-delete-line/m-p/97036#M8907</guid>
      <dc:creator>timgogl</dc:creator>
      <dc:date>2010-11-24T15:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete line ?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-delete-line/m-p/97037#M8908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You could use the Map.Graphics layer for drawing.&amp;nbsp; That's what I do.&amp;nbsp; Call 'map.graphics.clear()' to get rid of them to clear the interface or for redrawing.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could this solution work for you?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 16:39:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-delete-line/m-p/97037#M8908</guid>
      <dc:creator>JohnFreels</dc:creator>
      <dc:date>2010-12-09T16:39:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to delete line ?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-delete-line/m-p/97038#M8909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well i have solved it .I have declared a global array and pushed all the graphic retreived from database along with unique ID. Then i have removed the desired graphic by using Map.Graphic.Remove(graphic_Line[Id]). Method. And it works for me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks to All &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Zeeshan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Dec 2010 17:52:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-delete-line/m-p/97038#M8909</guid>
      <dc:creator>zeeshanbhatti</dc:creator>
      <dc:date>2010-12-09T17:52:54Z</dc:date>
    </item>
  </channel>
</rss>

