<?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: Query Problems when using query.geometry (Stumped). in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114604#M2720</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: caseybentz8&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I created a simple application that allows me to draw a polygon and query the service you are having trouble with, and it works as expected.&amp;nbsp; I have attached the code and icons that I used for my test.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Apr 2011 16:39:06 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2011-04-27T16:39:06Z</dc:date>
    <item>
      <title>Query Problems when using query.geometry (Stumped).</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114600#M2716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: cschafer5&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am wanting to run a Query that only displays the results within a specified polygon. I am doing this using query.geometry. I am getting the results I am looking for from most of my URLs and some return an error back to me. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attached pictures to show the problem. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The two pictures with arrows shows what I want to happen. In the first picture I get the hit the cap of 500 and on the second picture I click my checkbox to add the WV polygon to the query.geometry and get results only within the state.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The other two pictures show what happens with some URLs. The one not bound to the state gives me the results I expect. The second, when bound to the state using query.geometry, returns an HTTP error.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can't figure this one out. Is there a reason I would get an error when the only additional code between the two is the added geometry?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here are the two URLs used in the example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 (works):&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://publicsafetytemplates.esri.com/ArcGIS/rest/services/EMCOP/PublicSafetyFeedSample/MapServer/0"&gt;http://publicsafetytemplates.esri.com/ArcGIS/rest/services/EMCOP/PublicSafetyFeedSample/MapServer/0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2(Gives me an Error):&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://rmgsc.cr.usgs.gov/ArcGIS/rest/services/nhss_usdata/MapServer/0"&gt;http://rmgsc.cr.usgs.gov/ArcGIS/rest/services/nhss_usdata/MapServer/0&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 12:46:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114600#M2716</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-04-26T12:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: Query Problems when using query.geometry (Stumped).</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114601#M2717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Could you capture and post http query request using tools like firebug/httpfox/fiddler ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Apr 2011 20:57:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114601#M2717</guid>
      <dc:creator>MehulChoksey</dc:creator>
      <dc:date>2011-04-26T20:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: Query Problems when using query.geometry (Stumped).</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114602#M2718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: caseybentz8&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only thing I see is that the two are using a different spatial reference.&amp;nbsp; Have you tried passing the spatial reference wkid with the query?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2011 14:04:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114602#M2718</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-04-27T14:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: Query Problems when using query.geometry (Stumped).</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114603#M2719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have messed around with the spatialReferences with no luck on; however, I don't have much of a background in GIS and may be doing something wrong.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is where I run the Query:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var queryTask:QueryTask = new QueryTask(queryLayer);
&amp;nbsp;&amp;nbsp;&amp;nbsp; var query:Query = new Query();
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; query.outFields&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = queryFields.split(",");
&amp;nbsp;&amp;nbsp;&amp;nbsp; query.returnGeometry&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.useAMF&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = false;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(borderCheckBox.selected == true){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.geometry = borderGeom; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; query.where&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = rbeQuery;
&amp;nbsp;&amp;nbsp;&amp;nbsp; //query.where&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = "1=1";
&amp;nbsp;&amp;nbsp;&amp;nbsp; query.outSpatialReference&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = map.spatialReference;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.execute(query, new AsyncResponder(onRbeResult, onFault));&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I thought perhaps my geometry may be too large, so I tried simplifying it with a GeometryService with no luck either.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have attached some images from FireBug. I grouped them together to go along with the images I attached to my first post. Hopefully they aren't too small for you to read. Example 1 goes with the image with the arrows and Example 2 goes with the image with the water droplets.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your Help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:47:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114603#M2719</guid>
      <dc:creator>CoreySchafer</dc:creator>
      <dc:date>2021-12-11T06:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Query Problems when using query.geometry (Stumped).</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114604#M2720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: caseybentz8&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I created a simple application that allows me to draw a polygon and query the service you are having trouble with, and it works as expected.&amp;nbsp; I have attached the code and icons that I used for my test.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Apr 2011 16:39:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114604#M2720</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-04-27T16:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Query Problems when using query.geometry (Stumped).</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114605#M2721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for your response. I have also written simple geometries which work with the service too. This makes me believe it has something to do with how I am getting the border's geometry.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am a bit new to this, so perhaps the way I am getting the geometry is either wrong or harder than it needs to be. Currently, there is a Feature Layer which only has one feature which is the polygon I want to be my geometry. So this is how I am populating the geometry I want to use in the separate query that I am having troubles with.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;nbsp;&amp;nbsp; private function loadWVBorderGeometry():void{
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(borderGeom == null){&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var queryTask:QueryTask = new QueryTask(borderURL);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var query:Query = new Query();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.where = "1=1";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.returnGeometry = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.outFields = ["Shape"];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.outSpatialReference = map.spatialReference;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryTask.execute(query, new AsyncResponder(borderResult, borderFault));
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function borderResult(featureSet:FeatureSet, token:Object = null):void{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; borderGeom = featureSet.features[0].geometry;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; borderGeom.spatialReference = map.spatialReference;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; function borderFault(info:Object, token:Object = null):void{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert.show("Border not loaded");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } 
&amp;nbsp;&amp;nbsp; }
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I then use that borderGeom as the query.geometry in the code I had presented earlier. Is this the best practice when all I want is the geometry from the Feature Layer? It's all I can think of that can be the problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:47:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114605#M2721</guid>
      <dc:creator>CoreySchafer</dc:creator>
      <dc:date>2021-12-11T06:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Query Problems when using query.geometry (Stumped).</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114606#M2722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: caseybentz8&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What is borderGeom declared as?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 12:51:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114606#M2722</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-04-28T12:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Query Problems when using query.geometry (Stumped).</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114607#M2723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;a global variable as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;private var borderGeom:Geometry;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Apr 2011 13:17:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114607#M2723</guid>
      <dc:creator>CoreySchafer</dc:creator>
      <dc:date>2011-04-28T13:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Query Problems when using query.geometry (Stumped).</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114608#M2724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: caseybentz8&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have run out of ideas.&amp;nbsp; I can get it to work using the code below.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="color: #6699cc; font-size: 2;"&gt;&lt;SPAN style="color: #0033ff; font-size: 2;"&gt;
&lt;STRONG&gt;protected&lt;/STRONG&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 2;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #339966; font-size: 2;"&gt;&lt;STRONG&gt;function&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 2;"&gt; myMap_loadHandler(event:MapEvent):&lt;/SPAN&gt;&lt;SPAN style="color: #0033ff; font-size: 2;"&gt;&lt;STRONG&gt;void&lt;/STRONG&gt;


&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;[LEFT]&lt;STRONG&gt;{&lt;/STRONG&gt;
&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="color: #6699cc; font-size: 2;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt; queryTask2:QueryTask = &lt;/SPAN&gt;&lt;SPAN style="color: #0033ff; font-size: 2;"&gt;new&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt; QueryTask(&lt;/SPAN&gt;&lt;SPAN style="color: #990000; font-size: 2;"&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5" rel="nofollow noopener noreferrer" target="_blank"&gt;http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt;&lt;STRONG&gt;);&lt;/STRONG&gt;
&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="color: #6699cc; font-size: 2;"&gt;var&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt; query2:Query = &lt;/SPAN&gt;&lt;SPAN style="color: #0033ff; font-size: 2;"&gt;new&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt;&lt;STRONG&gt; Query();&lt;/STRONG&gt;
&lt;STRONG&gt;query2.where = &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #990000; font-size: 2;"&gt;&lt;STRONG&gt;"STATE_NAME ='West Virginia'"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;
&lt;STRONG&gt;query2.returnGeometry = &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0033ff; font-size: 2;"&gt;&lt;STRONG&gt;true&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;&lt;STRONG&gt;;&lt;/STRONG&gt;
&lt;STRONG&gt;query2.outFields = [&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #990000; font-size: 2;"&gt;&lt;STRONG&gt;"Shape"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;
&lt;STRONG&gt;query2.outSpatialReference = myMap.spatialReference;&lt;/STRONG&gt;
&lt;STRONG&gt;queryTask2.execute(query2, &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0033ff; font-size: 2;"&gt;&lt;STRONG&gt;new&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;&lt;STRONG&gt; AsyncResponder(borderResult, borderFault));&lt;/STRONG&gt;
&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="color: #339966; font-size: 2;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt; borderResult(featureSet:FeatureSet, token:Object = &lt;/SPAN&gt;&lt;SPAN style="color: #0033ff; font-size: 2;"&gt;null&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;):&lt;/SPAN&gt;&lt;SPAN style="color: #0033ff; font-size: 2;"&gt;void&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;
&lt;STRONG&gt;borderGeom = featureSet.features[0].geometry;&lt;/STRONG&gt;
&lt;STRONG&gt;borderGeom.spatialReference = myMap.spatialReference;&lt;/STRONG&gt;
&lt;STRONG&gt;stateLayer.add(featureSet.features[0]);&lt;/STRONG&gt;
&lt;STRONG&gt;query.geometry = borderGeom;&lt;/STRONG&gt;
&lt;STRONG&gt;queryTask.execute(query);&lt;/STRONG&gt;
&lt;STRONG&gt;}&lt;/STRONG&gt;
&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="color: #339966; font-size: 2;"&gt;function&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt; borderFault(info:Object, token:Object = &lt;/SPAN&gt;&lt;SPAN style="color: #0033ff; font-size: 2;"&gt;null&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;):&lt;/SPAN&gt;&lt;SPAN style="color: #0033ff; font-size: 2;"&gt;void&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;
&lt;STRONG&gt;Alert.show(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #990000; font-size: 2;"&gt;&lt;STRONG&gt;"Border not loaded"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;&lt;STRONG&gt;);&lt;/STRONG&gt;
&lt;STRONG&gt;} &lt;/STRONG&gt;
[/LEFT]
&lt;STRONG&gt;}&lt;/STRONG&gt;


&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="color: #0000ff; font-size: 2;"&gt;
&amp;lt;esri:QueryTask
&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt; id="&lt;/SPAN&gt;&lt;SPAN style="color: #990000; font-size: 2;"&gt;queryTask&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;"
concurrency="&lt;/SPAN&gt;&lt;SPAN style="color: #990000; font-size: 2;"&gt;last&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;"
executeComplete="onQueryExecuteComplete(event)"
showBusyCursor="&lt;/SPAN&gt;&lt;SPAN style="color: #990000; font-size: 2;"&gt;true&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;"
url="&lt;/SPAN&gt;&lt;SPAN style="color: #990000; font-size: 2;"&gt;&lt;A class="jive-link-external-small" href="http://publicsafetytemplates.esri.com/ArcGIS/rest/services/EMCOP/PublicSafetyFeedSample/MapServer/0" rel="nofollow noopener noreferrer" target="_blank"&gt;http://publicsafetytemplates.esri.com/ArcGIS/rest/services/EMCOP/PublicSafetyFeedSample/MapServer/0&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;"
useAMF="&lt;/SPAN&gt;&lt;SPAN style="color: #990000; font-size: 2;"&gt;false&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 2;"&gt;/&amp;gt;


&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;

&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 2;"&gt;&amp;lt;esri:Query&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt; id="&lt;/SPAN&gt;&lt;SPAN style="color: #990000; font-size: 2;"&gt;query&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;"
outSpatialReference="&lt;/SPAN&gt;&lt;SPAN style="color: #990000; font-size: 2;"&gt;{&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;myMap.spatialReference&lt;/SPAN&gt;&lt;SPAN style="color: #990000; font-size: 2;"&gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;"


returnGeometry="&lt;/SPAN&gt;&lt;SPAN style="color: #990000; font-size: 2;"&gt;true&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 2;"&gt;/&amp;gt;
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;STRONG style=": ; color: #0033ff; font-size: 2;"&gt;

private
&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #339966; font-size: 2;"&gt;function&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt; onQueryExecuteComplete(event:QueryEvent):&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0033ff; font-size: 2;"&gt;void


&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt;
{

&lt;/SPAN&gt;&lt;STRONG style=": ; color: #6699cc; font-size: 2;"&gt;var&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt; symbol:SimpleMarkerSymbol = &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0033ff; font-size: 2;"&gt;new&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt; SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_SQUARE, 8, 0xFFFF00, 0.5);
symbol.outline = &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0033ff; font-size: 2;"&gt;new&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt; SimpleLineSymbol();

&lt;/SPAN&gt;&lt;STRONG style=": ; color: #6699cc; font-size: 2;"&gt;var&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt; fset:FeatureSet = event.featureSet;
&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0033ff; font-size: 2;"&gt;for each&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt; (&lt;/SPAN&gt;&lt;STRONG style=": ; color: #6699cc; font-size: 2;"&gt;var&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt; graphic:Graphic &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0033ff; font-size: 2;"&gt;in&lt;/STRONG&gt;&lt;SPAN style="font-size:2;"&gt; fset.features)
{
graphic.symbol = symbol;
myGraphicsLayer.add(graphic);
}


}
&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:47:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114608#M2724</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T06:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Query Problems when using query.geometry (Stumped).</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114609#M2725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I can get that URL to work with the current code I have. The one I am getting an error with and can't figure out why is &lt;/SPAN&gt;&lt;A href="http://rmgsc.cr.usgs.gov/ArcGIS/rest/services/nhss_usdata/MapServer/0"&gt;http://rmgsc.cr.usgs.gov/ArcGIS/rest/services/nhss_usdata/MapServer/0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My only guess is that maybe it is a spatial issue, but I am newer to GIS so I'm not 100%.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've still been trying different approached with no luck...still stumped as to why it works when the geometry isn't applied, but I get the error when the only change made to the query is the border...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have changed my code to fetch the border geometry the same way you did (query2.where = "STATE NAME....). It seems to run faster than what I had before with a simpler geometry returned. Still no luck when I use that geometry either though.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW thank you so much for your help...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 18:08:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114609#M2725</guid>
      <dc:creator>CoreySchafer</dc:creator>
      <dc:date>2011-05-10T18:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Query Problems when using query.geometry (Stumped).</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114610#M2726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: watson_j&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not sure if this is related, but I am noticing that sometimes either the Flex API or the Viewer (at 2.3.1) is making an invalid URL when hitting REST services on my server.&amp;nbsp; It is asking for ".../mapserver/..." instead of ".../MapServer/..." as it should.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Might want to focus on the URLs being sent back/forth to your server to make sure they are not mal-forming the "MapServer" mixed-case to "mapserver" lower-case.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 19:42:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114610#M2726</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-05-10T19:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Query Problems when using query.geometry (Stumped).</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114611#M2727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So, now that I am querying the proper service.&amp;nbsp; I now get the same error as you.&amp;nbsp; The fault content shows that it is an invalid url.&amp;nbsp; I am not sure what the xml style comment is all about.&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;&lt;BR /&gt; &lt;BR /&gt;The specified URL cannot be found&amp;lt;!--0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234--&amp;gt;&lt;BR /&gt; &lt;BR /&gt;It is really weird, when I go back to attempting to draw a polygon to query that layer, I get some mixed results.&amp;nbsp; I can draw a simple rectangle and get a proper result every time.&amp;nbsp; I can draw a point to point style polygon with up to 36 vertices and it will work.&amp;nbsp; When I try 37 or more it fails everytime.&amp;nbsp; I can also draw a very small free hand polygon and it works, I am assuimg that it has less the 37 vertices.&amp;nbsp; It seems like there is something up with &lt;SPAN style="color: #990000; font-size: 2;"&gt;rmgsc.cr.usgs.gov's &lt;/SPAN&gt;ArcGIS Server.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 16:05:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114611#M2727</guid>
      <dc:creator>CaseyBentz</dc:creator>
      <dc:date>2011-05-11T16:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: Query Problems when using query.geometry (Stumped).</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114612#M2728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: caseybentz8&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could try this method, add a where tag to your query. It appears that the STANAME always ends with the state abbreviation. I then commented out the query.geometry = borderGeom line, and it brings back 118 features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; font-size: 2;"&gt;&amp;lt;esri:Query&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;[LEFT]&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;id="&lt;/SPAN&gt;&lt;SPAN style="color: #990000; font-size: 2;"&gt;query&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;P align="left"&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;outSpatialReference="&lt;/SPAN&gt;&lt;SPAN style="color: #990000; font-size: 2;"&gt;{&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;myMap.spatialReference&lt;/SPAN&gt;&lt;SPAN style="color: #990000; font-size: 2;"&gt;}&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size:2;"&gt;where="&lt;/SPAN&gt;&lt;SPAN style="color: #990000; font-size: 2;"&gt;STANAME LIKE '%WV'&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size:2;"&gt;returnGeometry="&lt;/SPAN&gt;&lt;SPAN style="color: #990000; font-size: 2;"&gt;true&lt;/SPAN&gt;&lt;SPAN style="font-size:2;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 2;"&gt;&lt;SPAN style="color: #0000ff; font-size: 2;"&gt;/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/LEFT]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2011 16:14:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/query-problems-when-using-query-geometry-stumped/m-p/114612#M2728</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-05-11T16:14:00Z</dc:date>
    </item>
  </channel>
</rss>

