<?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 Odd Issue with GraphicsLayer::getGraphicIDs(float x, float y, int tolerance) in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/odd-issue-with-graphicslayer-getgraphicids-float-x/m-p/83618#M638</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Implementing a typical identify - and doing the following- on a ArcGISFeatureLayer with 50 or so polygons - the GetGraphicsID() frequently brings back more polygons than expected - polygons that are not connected and not near the point selected:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Notes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* The polygons brought back have different objectids&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* There are other polygons between and nearer that are not brought back as the result (see the selected items in the screenshot)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* it doesn't happen with all polygons - &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* once you find two polygons like this - it is reproducible - clicking on either one will select the other even if they are at opposite ends of the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Create Layer code and add polygons section of code&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Options options = new Options();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; options.mode = MODE.SNAPSHOT;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; FeatureSet fs = new FeatureSet();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; fLayer = new ArcGISFeatureLayer(CachedData.sRestLayerDef, fs, options);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Graphic[] graphics=(Graphic[])(msg.obj);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {//all graphics are created and added one at a time&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Polygon geom = Utils.GetPolygonFromJson(...);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Graphic graphic&amp;nbsp; = new Graphic(geom, fill, attributes, null);;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; graphics.add(graphic);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; fLayer.addGraphics(graphics);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@Override public boolean onSingleTap(final MotionEvent e)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;int[] ids = featureLayer.getGraphicIDs((float)e.getX(), (float)e.getY(), 15);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;featureLayer.setSelectedGraphics(ids, true);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]24614[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ambrose.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 May 2013 13:23:15 GMT</pubDate>
    <dc:creator>AmbroseClarke</dc:creator>
    <dc:date>2013-05-23T13:23:15Z</dc:date>
    <item>
      <title>Odd Issue with GraphicsLayer::getGraphicIDs(float x, float y, int tolerance)</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/odd-issue-with-graphicslayer-getgraphicids-float-x/m-p/83618#M638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Implementing a typical identify - and doing the following- on a ArcGISFeatureLayer with 50 or so polygons - the GetGraphicsID() frequently brings back more polygons than expected - polygons that are not connected and not near the point selected:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Notes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* The polygons brought back have different objectids&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* There are other polygons between and nearer that are not brought back as the result (see the selected items in the screenshot)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* it doesn't happen with all polygons - &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;* once you find two polygons like this - it is reproducible - clicking on either one will select the other even if they are at opposite ends of the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Create Layer code and add polygons section of code&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Options options = new Options();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; options.mode = MODE.SNAPSHOT;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; FeatureSet fs = new FeatureSet();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; fLayer = new ArcGISFeatureLayer(CachedData.sRestLayerDef, fs, options);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Graphic[] graphics=(Graphic[])(msg.obj);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; {//all graphics are created and added one at a time&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Polygon geom = Utils.GetPolygonFromJson(...);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Graphic graphic&amp;nbsp; = new Graphic(geom, fill, attributes, null);;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; graphics.add(graphic);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; fLayer.addGraphics(graphics);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@Override public boolean onSingleTap(final MotionEvent e)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;int[] ids = featureLayer.getGraphicIDs((float)e.getX(), (float)e.getY(), 15);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;featureLayer.setSelectedGraphics(ids, true);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]24614[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ambrose.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 May 2013 13:23:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/odd-issue-with-graphicslayer-getgraphicids-float-x/m-p/83618#M638</guid>
      <dc:creator>AmbroseClarke</dc:creator>
      <dc:date>2013-05-23T13:23:15Z</dc:date>
    </item>
  </channel>
</rss>

