<?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: Layer Query with timout and maxResults in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-query-with-timout-and-maxresults/m-p/1686374#M88185</link>
    <description>&lt;P&gt;Just found the num-property which does exactly what I was looking for, limiting the number of results and (hopefully) breaking the seach.&lt;/P&gt;&lt;P&gt;This indirectly affects the runtime, so a limitation over time may be optional.&lt;/P&gt;&lt;P&gt;Full code:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const bufferGeometry = bufferOperator.execute(centerFeature.geometry!, 200, { unit: "meters"});
const bufferSearchResult = await Promise.all(searchLayers.map((l: FeatureLayer) =&amp;gt; {
	const query = l.createQuery();
	query.geometry = bufferGeometry;
	return l.queryFeatures(query);
}))&lt;/LI-CODE&gt;</description>
    <pubDate>Tue, 24 Feb 2026 19:22:07 GMT</pubDate>
    <dc:creator>SebastianKrings</dc:creator>
    <dc:date>2026-02-24T19:22:07Z</dc:date>
    <item>
      <title>Layer Query with timout and maxResults</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-query-with-timout-and-maxresults/m-p/1686349#M88184</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;we are performing spatial queries on multiple feature layers at once. At some cases the given geometry is pretty big and causes performance issues.&lt;/P&gt;&lt;P&gt;I am looking for a way to limit the query in time or amount instead of waiting til end or aborting it at al.&lt;/P&gt;&lt;P&gt;This is my current code:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const bufferGeometry = bufferOperator.execute(centerFeature.geometry!, 200, { unit: "meters"});
const bufferSearchResult = await Promise.all(searchLayers.map((l: FeatureLayer) =&amp;gt; {
	const query = l.createQuery();
	query.geometry = bufferGeometry
	return l.queryFeatures(query);
}))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I could make a timeout on the promise, but that way I am not getting any result at all.&lt;BR /&gt;I could limit the results after the query has finisehd but this needs the query to fully perform.&lt;BR /&gt;Both is not suitable for us.&lt;/P&gt;&lt;P&gt;Best case we are looking for can:&lt;BR /&gt;- limit the query running in time and return all results found so far&lt;BR /&gt;- limit the query running by a maximum of results and return as soon as the maximum is reached&lt;/P&gt;&lt;P&gt;Hope to see some ideas, thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Feb 2026 18:26:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-query-with-timout-and-maxresults/m-p/1686349#M88184</guid>
      <dc:creator>SebastianKrings</dc:creator>
      <dc:date>2026-02-24T18:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Layer Query with timout and maxResults</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-query-with-timout-and-maxresults/m-p/1686374#M88185</link>
      <description>&lt;P&gt;Just found the num-property which does exactly what I was looking for, limiting the number of results and (hopefully) breaking the seach.&lt;/P&gt;&lt;P&gt;This indirectly affects the runtime, so a limitation over time may be optional.&lt;/P&gt;&lt;P&gt;Full code:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;const bufferGeometry = bufferOperator.execute(centerFeature.geometry!, 200, { unit: "meters"});
const bufferSearchResult = await Promise.all(searchLayers.map((l: FeatureLayer) =&amp;gt; {
	const query = l.createQuery();
	query.geometry = bufferGeometry;
	return l.queryFeatures(query);
}))&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 24 Feb 2026 19:22:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-query-with-timout-and-maxresults/m-p/1686374#M88185</guid>
      <dc:creator>SebastianKrings</dc:creator>
      <dc:date>2026-02-24T19:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Layer Query with timout and maxResults</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-query-with-timout-and-maxresults/m-p/1686456#M88186</link>
      <description>&lt;P&gt;Hi Sebastian,&lt;/P&gt;&lt;P&gt;If possible, instead of creating a buffer geometry yourself, use the Query.distance and Query.unit to send the buffer parameters to the server and let it do it.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Feb 2026 01:44:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/layer-query-with-timout-and-maxresults/m-p/1686456#M88186</guid>
      <dc:creator>YannCabon</dc:creator>
      <dc:date>2026-02-25T01:44:30Z</dc:date>
    </item>
  </channel>
</rss>

