<?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 JS 4: Query with Distance not working - where to find supportsQueryWithDistance? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-4-query-with-distance-not-working-where-to-find/m-p/446283#M41199</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I have this code:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function segmentQuery(mapPoint) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;var queryTask = new QueryTask({&lt;BR /&gt;&lt;SPAN&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;url: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2F...%2FMapServer%2F0" rel="nofollow" target="_blank"&gt;https://.../MapServer/0&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var query = new Query({&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;geometry: mapPoint,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;distance: 5000,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;units: "miles",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;spatialRelationship: "intersects"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;queryTask.execute(query).then(function (result) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//take the top feature and open the segment popup&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (result.features[0]) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddSegmentPopup(result.features[0], mapPoint);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddPointGraphic(mapPoint);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This is based on a mapPoint received from a click event. For some reason it isn't hitting anything if I click near the feature but not on it (but within 5000 miles).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I noticed the documentation mentions "&lt;SPAN style="color: #4c4c4c;"&gt;This parameter only applies if &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Query_Feature_Service_Layer/02r3000000r1000000/" style="color: #0079c1; text-decoration: none;" target="_blank"&gt;supportsQueryWithDistance&lt;/A&gt;&lt;SPAN style="color: #4c4c4c;"&gt; is &lt;/SPAN&gt;&lt;CODE style="color: #595959; background-color: #f8f8f8; border: 1px solid #efefef; font-size: 0.85em;"&gt;true&lt;/CODE&gt;&lt;SPAN style="color: #4c4c4c;"&gt;." However, that link doesn't seem to have any useful information that I can find about how to enable it and where. Is that the problem? Is this something I can enable when publishing a service? I couldn't find anything like that in the Sharing..Publish Service dialog in ArcMap 10.3, but maybe that's because I only have Mapping capabilities added and nothing else?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c;"&gt;Or is this a much simpler problem that I'm missing somehow?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Apr 2017 19:21:04 GMT</pubDate>
    <dc:creator>EllaHaines</dc:creator>
    <dc:date>2017-04-26T19:21:04Z</dc:date>
    <item>
      <title>JS 4: Query with Distance not working - where to find supportsQueryWithDistance?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-4-query-with-distance-not-working-where-to-find/m-p/446283#M41199</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I have this code:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;function segmentQuery(mapPoint) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;var queryTask = new QueryTask({&lt;BR /&gt;&lt;SPAN&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;url: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2F...%2FMapServer%2F0" rel="nofollow" target="_blank"&gt;https://.../MapServer/0&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;var query = new Query({&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;geometry: mapPoint,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;distance: 5000,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;units: "miles",&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;spatialRelationship: "intersects"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;queryTask.execute(query).then(function (result) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//take the top feature and open the segment popup&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (result.features[0]) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddSegmentPopup(result.features[0], mapPoint);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;else {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;AddPointGraphic(mapPoint);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;});&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This is based on a mapPoint received from a click event. For some reason it isn't hitting anything if I click near the feature but not on it (but within 5000 miles).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I noticed the documentation mentions "&lt;SPAN style="color: #4c4c4c;"&gt;This parameter only applies if &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Query_Feature_Service_Layer/02r3000000r1000000/" style="color: #0079c1; text-decoration: none;" target="_blank"&gt;supportsQueryWithDistance&lt;/A&gt;&lt;SPAN style="color: #4c4c4c;"&gt; is &lt;/SPAN&gt;&lt;CODE style="color: #595959; background-color: #f8f8f8; border: 1px solid #efefef; font-size: 0.85em;"&gt;true&lt;/CODE&gt;&lt;SPAN style="color: #4c4c4c;"&gt;." However, that link doesn't seem to have any useful information that I can find about how to enable it and where. Is that the problem? Is this something I can enable when publishing a service? I couldn't find anything like that in the Sharing..Publish Service dialog in ArcMap 10.3, but maybe that's because I only have Mapping capabilities added and nothing else?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c;"&gt;Or is this a much simpler problem that I'm missing somehow?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Apr 2017 19:21:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-4-query-with-distance-not-working-where-to-find/m-p/446283#M41199</guid>
      <dc:creator>EllaHaines</dc:creator>
      <dc:date>2017-04-26T19:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: JS 4: Query with Distance not working - where to find supportsQueryWithDistance?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-4-query-with-distance-not-working-where-to-find/m-p/446284#M41200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ella,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The&amp;nbsp;supportsQueryWithDistance was added from ArcGIS Server 10.3.1 and onward.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Apr 2017 19:41:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-4-query-with-distance-not-working-where-to-find/m-p/446284#M41200</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-04-26T19:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: JS 4: Query with Distance not working - where to find supportsQueryWithDistance?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-4-query-with-distance-not-working-where-to-find/m-p/446285#M41201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;I believe it was just upgraded to 10.3.1, perhaps I should have specified that - where would I find it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Looks like I'm wrong, it's still 10.3 only. Thanks for letting me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Apr 2017 21:04:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-4-query-with-distance-not-working-where-to-find/m-p/446285#M41201</guid>
      <dc:creator>EllaHaines</dc:creator>
      <dc:date>2017-04-26T21:04:35Z</dc:date>
    </item>
  </channel>
</rss>

