Show more features button

190
11
07-10-2018 08:38 AM
EvelynHernandez
Regular Contributor

Hello everyone,

I want to know if there is an example on how i can handle a lot of data returned from my rest service (more than 1M features) in a good way.

My idea is doing something similar like a table that loads the first 50 features with a button that says "show more". So when u press it u load the next 50 and so on (till complete the 1M if the user wants).

Is there any way on how to handle this?

Thanks in advice

0 Kudos
11 Replies
EvelynHernandez
Regular Contributor

No ideas?

0 Kudos
JackFairfield
Occasional Contributor II

Which version of the API are you using?

0 Kudos
EvelynHernandez
Regular Contributor

3.24

0 Kudos
JackFairfield
Occasional Contributor II

How about something like this?

It loads features as you scroll down in the table:

ArcGIS API for JavaScript Sandbox 

0 Kudos
EvelynHernandez
Regular Contributor

Yea something like that, but there u dont use a query.

I have a query and a querytask with some where condition.

0 Kudos
JackFairfield
Occasional Contributor II

Can't you just set the definition expression instead of using queries?

0 Kudos
EvelynHernandez
Regular Contributor

Nope.

0 Kudos
JackFairfield
Occasional Contributor II

Why not?  Can you post some of your code?

0 Kudos
EvelynHernandez
Regular Contributor

Thats why i wanted an example. Most of the time im using query and querytask to get data from the service (im not using maps and im not using the featuretable that arcgis has (because i dont like how it looks). Also the map im not using it, only the data and manipulating it for doing some calculations or something else.

The thing is i want to know if there is a way (even in js) to perform a very big query to handle data in chunks (how most of the time in some eshops show the products with a button setted on show more to show the next 10 or 20 products.

0 Kudos