<?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: ParksFinder - Query Returns all Features in State &amp; Local Government Questions</title>
    <link>https://community.esri.com/t5/state-local-government-questions/parksfinder-query-returns-all-features/m-p/214819#M1265</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you are using AGS 10.1 SP1, my recommendation would be to move the Parks feature class to an ArcSDE gdb and keep the ParkRecInfo table in a fgdb.&amp;nbsp; When you do this, make sure to adjust the join in the MXD so it references the correct table.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are a couple of bugs involved in this that are working against each other.&amp;nbsp; The Rest query operation returns all results when the feature class and joined table are both in a fgdb.&amp;nbsp; This should be fixed in AGS 10.2.&amp;nbsp; If they are both moved to an ArcSDE gdb, the Rest query works but the Find operation fails.&amp;nbsp; This is fixed by moving the table to a fgdb.&amp;nbsp; If the Search function in the app still fails, please review &lt;/SPAN&gt;&lt;A href="http://support.esri.com/en/knowledgebase/techarticles/detail/40287"&gt;this KB&lt;/A&gt;&lt;SPAN&gt; to verify you have the alias configured properly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Jan 2013 15:07:47 GMT</pubDate>
    <dc:creator>JeffSmith</dc:creator>
    <dc:date>2013-01-31T15:07:47Z</dc:date>
    <item>
      <title>ParksFinder - Query Returns all Features</title>
      <link>https://community.esri.com/t5/state-local-government-questions/parksfinder-query-returns-all-features/m-p/214816#M1262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am in the process of configuring the ParksFinder template from the Local Government resource center.&amp;nbsp; I have gotten everything to work except for that when I try to select parks that are within the 1 mile buffer the query returns all the parks in my map service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have changed the spatial reference throughout my app to match my services.&amp;nbsp; When I use Firebug I can see the extent sent through the query seems to be correct, but the query always returns all the park features.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The spatial reference I am currently using is "wkid: 103779".&amp;nbsp; I have also reomved all references to esri services including the routing functionality, so I am not sure why there would be an issue with my spatial reference.&amp;nbsp; I have tested out some attribute queries and they all work, so it is definitely an issue with the spatial relationship portion of the query statement.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the code for my query task...&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;/function for drawing the buffer
function DoBuffer(bufferDistance, mapPoint) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (mapPoint &amp;amp;&amp;amp; bufferDistance) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var params = new esri.tasks.BufferParameters();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; params.distances = [bufferDistance];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; params.unit = esri.tasks.GeometryService.UNIT_STATUTE_MILE;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; params.bufferSpatialReference = map.spatialReference;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; params.outSpatialReference = map.spatialReference;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; params.geometries = [mapPoint];
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; params.unionResults = true;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; geometryService.buffer(params, ShowBuffer);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; features = [];
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}

//function for Displaying the buffer
function ShowBuffer(geometries) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; ClearBuffer();
&amp;nbsp;&amp;nbsp;&amp;nbsp; var lineColor = new dojo.Color();
&amp;nbsp;&amp;nbsp;&amp;nbsp; lineColor.setColor(rendererColor);
&amp;nbsp;&amp;nbsp;&amp;nbsp; var fillColor = new dojo.Color();
&amp;nbsp;&amp;nbsp;&amp;nbsp; fillColor.setColor(rendererColor);
&amp;nbsp;&amp;nbsp;&amp;nbsp; fillColor.a = 0.55;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lineColor, 2),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fillColor);
&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.forEach(geometries, function (geometry) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AddGraphic(map.getLayer(tempBufferLayer), symbol, geometry);
&amp;nbsp;&amp;nbsp;&amp;nbsp; });

&amp;nbsp;&amp;nbsp;&amp;nbsp; map.setExtent(geometries[0].getExtent().expand(1.2));
&amp;nbsp;&amp;nbsp;&amp;nbsp; QueryLayer(geometries[0]);
}



//function for getting the features and their length with in the buffer region
function QueryLayer(geometry) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; var cityName = "CITY OF BIG LAKE";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var qTask = 'qTask';
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qTask = new esri.tasks.QueryTask(devPlanLayerURL);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var query = new esri.tasks.Query();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.geometry = geometry;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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; query.spatialRelationship = esri.tasks.Query.SPATIAL_REL_WITHIN;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; query.returnGeometry = true;

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; qTask.execute(query, function (featureset) {
&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; if (dojo.byId('spanParkActivityContainer')) {
&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; dojo.byId('spanParkActivityContainer').style.display = 'none';
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.byId('spanParkListContainer').innerHTML = 'Found ' + featureset.features.length + ' park(s) near the address';
&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; CreateDistance(featureset);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone ever experience an issue like this before?&amp;nbsp; Any help would be greatly appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:31:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/state-local-government-questions/parksfinder-query-returns-all-features/m-p/214816#M1262</guid>
      <dc:creator>BrianLord1</dc:creator>
      <dc:date>2021-12-11T10:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: ParksFinder - Query Returns all Features</title>
      <link>https://community.esri.com/t5/state-local-government-questions/parksfinder-query-returns-all-features/m-p/214817#M1263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Mark,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What version of ArcGIS Server are you using?&amp;nbsp; There are several known issues unique to 10.0 or 10.1 related to Rest queries on map services with joins.&amp;nbsp; I suspect this is what you are running into and I can provide more information once I know what version you have.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Jan 2013 14:08:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/state-local-government-questions/parksfinder-query-returns-all-features/m-p/214817#M1263</guid>
      <dc:creator>JeffSmith</dc:creator>
      <dc:date>2013-01-02T14:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: ParksFinder - Query Returns all Features</title>
      <link>https://community.esri.com/t5/state-local-government-questions/parksfinder-query-returns-all-features/m-p/214818#M1264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am also experiencing this issue.&amp;nbsp; I am using ArcGIS for Server 10.1.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jan 2013 18:30:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/state-local-government-questions/parksfinder-query-returns-all-features/m-p/214818#M1264</guid>
      <dc:creator>JacobDeuel1</dc:creator>
      <dc:date>2013-01-30T18:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: ParksFinder - Query Returns all Features</title>
      <link>https://community.esri.com/t5/state-local-government-questions/parksfinder-query-returns-all-features/m-p/214819#M1265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you are using AGS 10.1 SP1, my recommendation would be to move the Parks feature class to an ArcSDE gdb and keep the ParkRecInfo table in a fgdb.&amp;nbsp; When you do this, make sure to adjust the join in the MXD so it references the correct table.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are a couple of bugs involved in this that are working against each other.&amp;nbsp; The Rest query operation returns all results when the feature class and joined table are both in a fgdb.&amp;nbsp; This should be fixed in AGS 10.2.&amp;nbsp; If they are both moved to an ArcSDE gdb, the Rest query works but the Find operation fails.&amp;nbsp; This is fixed by moving the table to a fgdb.&amp;nbsp; If the Search function in the app still fails, please review &lt;/SPAN&gt;&lt;A href="http://support.esri.com/en/knowledgebase/techarticles/detail/40287"&gt;this KB&lt;/A&gt;&lt;SPAN&gt; to verify you have the alias configured properly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Jan 2013 15:07:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/state-local-government-questions/parksfinder-query-returns-all-features/m-p/214819#M1265</guid>
      <dc:creator>JeffSmith</dc:creator>
      <dc:date>2013-01-31T15:07:47Z</dc:date>
    </item>
  </channel>
</rss>

