<?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: Features not found with query.geometry in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/features-not-found-with-query-geometry/m-p/79493#M7270</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I changed my question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Mar 2016 19:11:30 GMT</pubDate>
    <dc:creator>EvelynHernandez</dc:creator>
    <dc:date>2016-03-23T19:11:30Z</dc:date>
    <item>
      <title>Features not found with query.geometry</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/features-not-found-with-query-geometry/m-p/79492#M7269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Im trying to make a query with the map.onclick to get the features founded around the click.&lt;/P&gt;&lt;P&gt;I have added 2 featurelayers that have some values that i want to get when the user clicks to make another analysis.&lt;/P&gt;&lt;P&gt;The problem that now im having is that even if i make a polygon to search for any value, my featureSet doesnt give me any.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function clickSearch(mapPoint){&lt;/P&gt;&lt;P&gt;&amp;nbsp; var rectangle = new esri.geometry.Polygon(new esri.SpatialReference(mapPoint.spatialReference.wkid));&lt;/P&gt;&lt;P&gt;&amp;nbsp; rectangulo.addRing(createRectangle(mapPoint,20));&lt;/P&gt;&lt;P&gt;&amp;nbsp; console.log(rectangulo);&lt;/P&gt;&lt;P&gt;&amp;nbsp; var queryTask = new esri.tasks.QueryTask(layers.read_layer_interr_sed());&lt;/P&gt;&lt;P&gt;&amp;nbsp; var query = new esri.tasks.Query;&lt;/P&gt;&lt;P&gt;&amp;nbsp; query.spatialRelationship=esri.tasks.Query.SPATIAL_REL_CONTAINS;&lt;/P&gt;&lt;P&gt;&amp;nbsp; query.geometry = rectangulo;&lt;/P&gt;&lt;P&gt;&amp;nbsp; query.outFields=['*'];&lt;/P&gt;&lt;P&gt;&amp;nbsp; query.returnGeometry = true;&lt;/P&gt;&lt;P&gt;&amp;nbsp; queryTask.execute(query,(featureSet)=&amp;gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("found something here...what is it?");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(featureSet.features.length!=0){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(featureSet.features);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }else console.log("nothing");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; },(error)=&amp;gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("no encontre na" , error);&lt;/P&gt;&lt;P&gt;&amp;nbsp; });&lt;/P&gt;&lt;P&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; function createRectangle(mapPoint,delta){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var arrayOfPoints = [];&lt;/P&gt;&lt;P&gt;&amp;nbsp; arrayOfPoints[0] = new esri.geometry.Point(mapPoint.x-delta,mapPoint.y-delta,mapPoint.spatialReference);&lt;/P&gt;&lt;P&gt;&amp;nbsp; arrayOfPoints[1] = new esri.geometry.Point(mapPoint.x-delta,mapPoint.y+delta,mapPoint.spatialReference);&lt;/P&gt;&lt;P&gt;&amp;nbsp; arrayOfPoints[2] = new esri.geometry.Point(mapPoint.x+delta,mapPoint.y+delta,mapPoint.spatialReference);&lt;/P&gt;&lt;P&gt;&amp;nbsp; arrayOfPoints[3] = new esri.geometry.Point(mapPoint.x+delta,mapPoint.y-delta,mapPoint.spatialReference);&lt;/P&gt;&lt;P&gt;&amp;nbsp; arrayOfPoints[4] = new esri.geometry.Point(mapPoint.x-delta,mapPoint.y-delta,mapPoint.spatialReference);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; return arrayOfPoints;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:&lt;/P&gt;&lt;P&gt;I&lt;STRONG&gt;m not using require&lt;/STRONG&gt; to load the modules.&lt;/P&gt;&lt;P&gt;Im programming with ReactJS, webpack server and i just installed the api in that server.&lt;/P&gt;&lt;P&gt;I have been used all the elements for the api in this way:&lt;/P&gt;&lt;P&gt;Example for featureLayer.&lt;/P&gt;&lt;P&gt;var myDynamicSedLayer =&lt;STRONG&gt; new esri.layers.FeatureLayer&lt;/STRONG&gt;(layers.read_layer_interr_sed(),{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mode: esri.layers.FeatureLayer.MODE_SNAPSHOT,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infoTemplate: myinfotemplate.getSubFailure(),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFields: ["*"]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone knows what could be happening? or any example doing this.&lt;/P&gt;&lt;P&gt;I already search about it in the sample api.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advice.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 17:48:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/features-not-found-with-query-geometry/m-p/79492#M7269</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2016-03-23T17:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Features not found with query.geometry</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/features-not-found-with-query-geometry/m-p/79493#M7270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I changed my question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 19:11:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/features-not-found-with-query-geometry/m-p/79493#M7270</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2016-03-23T19:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Features not found with query.geometry</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/features-not-found-with-query-geometry/m-p/79494#M7271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Evelyn,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; You have seriously limited the number of people that will be able to help you (probably by 95% or more) now that you have chosen to use react instead of vanilla javascript, just FYI.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you sure you need &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;SPATIAL_REL_CONTAINS and not &lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;SPATIAL_REL_&lt;/SPAN&gt;INTERSECTS?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 20:28:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/features-not-found-with-query-geometry/m-p/79494#M7271</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2016-03-23T20:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Features not found with query.geometry</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/features-not-found-with-query-geometry/m-p/79495#M7272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, im using the legacy side and not amd to play with reactjs, so how in the samples some of them are with AMD and legacy code, i choose legacy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well now i think i fix part of my problem doing this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; myDynamicLayer1.on("click",(event)=&amp;gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp; console.log(event.graphic.attributes);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this way i will be able to get any attribute that im looking for the click and then using it to more complex analysis or queries.&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 21:08:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/features-not-found-with-query-geometry/m-p/79495#M7272</guid>
      <dc:creator>EvelynHernandez</dc:creator>
      <dc:date>2016-03-23T21:08:47Z</dc:date>
    </item>
  </channel>
</rss>

