<?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 with KMZ format output returns bad results in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-with-kmz-format-output-returns-bad-results/m-p/671062#M3265</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am now seeing a similar issue. 10.04.&lt;/P&gt;&lt;P&gt;Anyone find a solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Oct 2014 21:46:15 GMT</pubDate>
    <dc:creator>KevinGooss</dc:creator>
    <dc:date>2014-10-02T21:46:15Z</dc:date>
    <item>
      <title>Query with KMZ format output returns bad results</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-with-kmz-format-output-returns-bad-results/m-p/671058#M3261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;AGS Server 10 SP2, using REST endpoint to query based on attribute value, such as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="http://server/ArcGIS/rest/services/MyService/MapServer/1/query?text=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryEnvelope&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;relationParam=&amp;amp;objectIds=&amp;amp;where=STRUCTURENAME+LIKE+%27%25garage%25%27&amp;amp;time=&amp;amp;returnCountOnly=false&amp;amp;returnIdsOnly=false&amp;amp;returnGeometry=true&amp;amp;maxAllowableOffset=&amp;amp;outSR=4326&amp;amp;outFields=STRUCTURENAME&amp;amp;f=html" rel="nofollow" target="_blank"&gt;http://server/ArcGIS/rest/services/MyService/MapServer/1/query?text=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryEnvelope&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;relationParam=&amp;amp;objectIds=&amp;amp;where=STRUCTURENAME+LIKE+%27%25garage%25%27&amp;amp;time=&amp;amp;returnCountOnly=false&amp;amp;returnIdsOnly=false&amp;amp;returnGeometry=true&amp;amp;maxAllowableOffset=&amp;amp;outSR=4326&amp;amp;outFields=STRUCTURENAME&amp;amp;f=html&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Works great, returns 557 records. If I change the last parameter (format) to f=kmz, the KML returned contains all of the records in that layer (&amp;gt; 2000) - so WHERE clause doesn't seem to matter. A known bug?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2012 13:29:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-with-kmz-format-output-returns-bad-results/m-p/671058#M3261</guid>
      <dc:creator>OlegKachirski</dc:creator>
      <dc:date>2012-05-09T13:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Query with KMZ format output returns bad results</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-with-kmz-format-output-returns-bad-results/m-p/671059#M3262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It doesn't seem like a generic bug. For example, give this request a try.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://servicesbeta.esri.com/ArcGIS/rest/services/Hurricanes/Hurricanes/MapServer/0/query?text=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryPoint&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;relationParam=&amp;amp;objectIds=&amp;amp;where=EVENTID+LIKE+%27Mic%25%27&amp;amp;time=&amp;amp;returnCountOnly=false&amp;amp;returnIdsOnly=false&amp;amp;returnGeometry=true&amp;amp;maxAllowableOffset=&amp;amp;outSR=4326&amp;amp;outFields=EVENTID&amp;amp;f=kmz"&gt;http://servicesbeta.esri.com/ArcGIS/rest/services/Hurricanes/Hurricanes/MapServer/0/query?text=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryPoint&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;relationParam=&amp;amp;objectIds=&amp;amp;where=EVENTID+LIKE+%27Mic%25%27&amp;amp;time=&amp;amp;returnCountOnly=false&amp;amp;returnIdsOnly=false&amp;amp;returnGeometry=true&amp;amp;maxAllowableOffset=&amp;amp;outSR=4326&amp;amp;outFields=EVENTID&amp;amp;f=kmz&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any join table in the layer that is queried?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 May 2012 14:58:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-with-kmz-format-output-returns-bad-results/m-p/671059#M3262</guid>
      <dc:creator>RaviNarayanan</dc:creator>
      <dc:date>2012-05-10T14:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Query with KMZ format output returns bad results</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-with-kmz-format-output-returns-bad-results/m-p/671060#M3263</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;Old thread but I'm currently facing the same problem... &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've three layers in a MapService (bus stops, commercial paths and non commercial paths) and each layer is mapped with a table in an SQLServer GeoDatabase. Each field in thoses tables contains an "site id", so that we know to which City it belongs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are two relationship classes in my Geodatabase :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- One linking bus stops and commercial paths&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- One linking bus stops and non commercial paths&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The Map Service is published with the "KML" capability.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Everytime I launch a query request using REST interface on a layer (let's say for example the bus stops layer), using a Where clause to filter on a particular site_id :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- if the out format is "HTML" or "JSON", then the result contains only the bus stops of the desired site&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- if the out format is "KMZ", then the results contains the bus stops of the whole database... &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looks like the where clause is not considered when the output format is set to KMZ.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea on this ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thomas&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Aug 2013 15:39:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-with-kmz-format-output-returns-bad-results/m-p/671060#M3263</guid>
      <dc:creator>ThomasBarthes</dc:creator>
      <dc:date>2013-08-05T15:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Query with KMZ format output returns bad results</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-with-kmz-format-output-returns-bad-results/m-p/671061#M3264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It looks like you are running into the following bug:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;NIM075556 - REST queries do not honor the �??Where�?� clause for KMZ response if the map service is created from an MXD &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The workaround is to publish your services from an MSD rather than an MXD.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Aug 2013 23:56:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-with-kmz-format-output-returns-bad-results/m-p/671061#M3264</guid>
      <dc:creator>StevenMoore1</dc:creator>
      <dc:date>2013-08-12T23:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Query with KMZ format output returns bad results</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-with-kmz-format-output-returns-bad-results/m-p/671062#M3265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am now seeing a similar issue. 10.04.&lt;/P&gt;&lt;P&gt;Anyone find a solution?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2014 21:46:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/query-with-kmz-format-output-returns-bad-results/m-p/671062#M3265</guid>
      <dc:creator>KevinGooss</dc:creator>
      <dc:date>2014-10-02T21:46:15Z</dc:date>
    </item>
  </channel>
</rss>

