<?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: Removing selected graphics from map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-selected-graphics-from-map/m-p/173794#M16125</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Steve,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Reading your posts again, perhaps I am just misunderstanding a key point in this.&amp;nbsp; When I create a buffer against a graphics layer containing point features, does it query against the single map point, or does it actually run the query against the pixels of the actual graphic in that layer?&amp;nbsp; I was assuming the former, but if it is actually querying all the pixels that make up a single graphic, I can see how this could work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jonathan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Feb 2013 14:22:48 GMT</pubDate>
    <dc:creator>JonathanKressin</dc:creator>
    <dc:date>2013-02-18T14:22:48Z</dc:date>
    <item>
      <title>Removing selected graphics from map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-selected-graphics-from-map/m-p/173790#M16121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am adding the ability to delete created graphics in my application.&amp;nbsp; I have it working pretty well with an extent being drawn and features that are contained/intersect the extent are removed. (using extent.contains and extent.intersects)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, when working with point features, especially text and large symbols, the user has to select the exact point where the symbol was inserted using this method.&amp;nbsp; Is there an alternate way to do this so that a user can select any part of the symbol and remove the graphic?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jonathan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2013 15:13:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-selected-graphics-from-map/m-p/173790#M16121</guid>
      <dc:creator>JonathanKressin</dc:creator>
      <dc:date>2013-02-14T15:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Removing selected graphics from map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-selected-graphics-from-map/m-p/173791#M16122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;when working with point features, especially text and large symbols, the user has to select the exact point&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi Jonathan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can get around this by buffering the point clicked by the user, and using the buffer to select your graphics. There's a sample &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/#sample/query_buffer"&gt;here&lt;/A&gt;&lt;SPAN&gt; which shows how to get started.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Feb 2013 20:40:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-selected-graphics-from-map/m-p/173791#M16122</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2013-02-14T20:40:02Z</dc:date>
    </item>
    <item>
      <title>Re: Removing selected graphics from map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-selected-graphics-from-map/m-p/173792#M16123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Jonathan,&lt;BR /&gt;&lt;BR /&gt;You can get around this by buffering the point clicked by the user, and using the buffer to select your graphics. There's a sample &lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/#sample/query_buffer"&gt;here&lt;/A&gt; which shows how to get started.&lt;BR /&gt;&lt;BR /&gt;Steve&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your response.&amp;nbsp; I didn't think you could use the QueryTask against a graphics layer, as it isn't an operational layer you can initialize the query with.&amp;nbsp; If I understand you correctly, you are suggesting I basically create a bubble (the buffer) around a point clicked and then query for any graphics within that space.&amp;nbsp; This seems even less precise then allowing the user to draw a box around the object, as then not only do they have to click within a certain distance of the center point of the point, but they will be more likely to select and delete other nearby graphics.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An example of what I want to do is this:&amp;nbsp; draw a large cross symbol on the map and be able to click on any of the arms of that cross to select it but not select it if I click on the white space between arms.&amp;nbsp; I have seen this done on other current GIS web applications, so I know it is possible.&amp;nbsp; I just don't know how to get to the point where I am interacting with what is drawn on the screen versus its point representation in the graphics layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jonathan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2013 13:21:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-selected-graphics-from-map/m-p/173792#M16123</guid>
      <dc:creator>JonathanKressin</dc:creator>
      <dc:date>2013-02-15T13:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Removing selected graphics from map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-selected-graphics-from-map/m-p/173793#M16124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;you are suggesting I basically create a bubble (the buffer) around a point clicked and then query for any graphics within that space.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is necessary when selecting a point, since it's virtually impossible for you to click &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;exactly&lt;/SPAN&gt;&lt;SPAN&gt; on the point's location. Instead, you want to select any point &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;within a certain distance&lt;/SPAN&gt;&lt;SPAN&gt; of the mouse coordinates. This distance can be very small, eg 3 pixels. Note that even in ArcMap, that's what happens when you use the Select tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;This seems even less precise then allowing the user to draw a box around the object, as then not only do they have to click within a certain distance of the center point of the point, but they will be more likely to select and delete other nearby graphics.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could use logic such as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;- if only one point is returned, delete it&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- if multiple features are returned, highlight them and let the user toggle through them to decide which one(s) to delete&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;An example of what I want to do is this:&amp;nbsp; draw a large cross symbol on the map and be able to click on any of the arms of that cross to select it but not select it if I click on the white space between arms.&amp;nbsp; I have seen this done on other current GIS web applications, so I know it is possible.&amp;nbsp; I just don't know how to get to the point where I am interacting with what is drawn on the screen versus its point representation in the graphics layer.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You'd need to write this yourself as there's nothing out-of-the-box which will do this. The basic principle will be the same though - rather than searching for points within the circular buffer you'd be searching within the cross-shaped graphic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Feb 2013 22:49:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-selected-graphics-from-map/m-p/173793#M16124</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2013-02-15T22:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: Removing selected graphics from map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-selected-graphics-from-map/m-p/173794#M16125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Steve,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Reading your posts again, perhaps I am just misunderstanding a key point in this.&amp;nbsp; When I create a buffer against a graphics layer containing point features, does it query against the single map point, or does it actually run the query against the pixels of the actual graphic in that layer?&amp;nbsp; I was assuming the former, but if it is actually querying all the pixels that make up a single graphic, I can see how this could work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jonathan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Feb 2013 14:22:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/removing-selected-graphics-from-map/m-p/173794#M16125</guid>
      <dc:creator>JonathanKressin</dc:creator>
      <dc:date>2013-02-18T14:22:48Z</dc:date>
    </item>
  </channel>
</rss>

