Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

L.esri.Query does not use offset and limit functions correctly

See original GitHub issue

Hi, everyone,

sorry for not following the guidelines, but this issue kind of does not fit in them.

When doing a call like this using L.esri.DynamicMapLayer:

var query = this.query()

The returned result is not limited at all and returns all results at once.

When doing a call like this using L.esri.DynamicMapLayer:

var query = this.query()

query.params.resultRecordCount = 10;
query.params.resultOffset = 0;;

The returned result is limited to 10 elements and I can successfully use resultOffset later on to return all the other results step by step.

I use this service:

And they use at least ArcGIS 10.3 as I understand.

I expected the limit and offset to work the same way as resultRecordCount and resultOffset works right now in terms of returning results.

Can you confirm if this is a bug or am I doing something wrong?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

simoxu001commented, Mar 11, 2020

Thank you @jgravois for sharing this. I’ve been stumped by this for a week! This unpredictable nature is affecting other APIs as well.

jgravoiscommented, Mar 11, 2020

greetings @theashyster! its been a year and half, but i just found some documentation that attempts to explain the somewhat unpredictable nature of exceededTransferLimit so i thought i’d forward it along.

In some cases when using the resultOffset and resultRecordCount parameters, the exceededTransferLimit property may be included in the query results even though the value specified in the resultRecordCount has not been exceeded. This is due to internal spatial index filtering of the query results. For this reason you should always rely on the exceededTransferLimit property to determine if you should page through results rather than relying on the number of results returned from each page. In some extreme cases zero results can be returned but the exceededTransferLimit property will be returned. In these cases you should continue paging though your results until exceededTransferLimit is no longer returned.


Read more comments on GitHub >

github_iconTop Results From Across the Web

L.esri.Query | Esri Leaflet - ArcGIS Developers
Define the offset of the results, when combined with `limit` can be used for paging. Only available for Feature Layers hosted on ArcGIS...
Read more >
WHERE "IN" clause limits? - Esri Community
Solved: Hi all, Is there a set number of values that can be contained in a "IN" clause when performing REST queries of...
Read more >
Equivalent of LIMIT and OFFSET of SQL in pandas?
Yes, integer location, where iloc starting index is the 'offset' and ending index is incremented by 'limit':
Read more >
Which part of the following sql query enables an analyst to ...
The first example does not use clause grouping, and the returned results are not as expected.When executing SQL queries, it is important to...
Read more >
CGA Changelog - Esri GitHub
Unused rules and functions are not written to the CGB anymore. ... a bug where the error was not correctly shown when huge...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found