Select to view content in your preferred language

Adding Feature Layer - Snapshot mode slow and ondemand mode inconsistent results

3649
4
11-24-2015 02:46 AM
roberttilson
Deactivated User

I am adding a Feature layer via ArcGIS Server. Using Snapshot mode takes 30 seconds to show the data and the OnDemand mode is unreliable in the results it displays, in that there are patches of data which are not displayed.

Currently the data set is quite small, with a only a few hundred features, and I've tried on Chrome/IE. etc..

I was able to produce the ondemand problem by doing the below:

Go to http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=fl_ondemand

If you change the zoom level to 5 and change the url to http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/3
,(3 instead of 2), you’ll notice that an area of the map does not display any counties around the Cincinnati area.

I'm using JS API 3.14 and ArcGIS Server 10.3

Thanks

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus

Robert,

   There are a couple of things to consider here. One is that each server is configured for a maximum number of feature geometries to return. Older server defaulted to 500 and newer ones default to 1000. When using FeatureLayer it is requesting the  json representation of each polygon and each polygons vertices(this amount to alot of text when dealing with large complex polygons). You may want to look into the max offset property to generalize your data. With 4.0 api we will have access to feature caching and this will be much less of an issue.

roberttilson
Deactivated User

Thanks for your help.

Our servers do default to 1000, which is sufficient for the features being displayed. The polygons are not complex, although the json does contain all of the associated attributes, which could slow things down I suppose?. Is it worth looking at or setting the maxAllowableOffset property then?.

4.0/feature caching looks like a good option. I noticed Beta 2 is out, but do you know roughly when there will be a stable release?

Many thanks

Rob

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rob,

Your example of the slowness issue uses the counties layer, and its feature count is: 3141, (so a max features returned of 1000) is NOT enough and that layer is detailed county geometry (complex).

So when you are using your layer you are saying that 1000 is enough yet all the features are not drawing in OnDemand mode?...

The 4.0 (non-beta) release is planned for the first half of 2016.

FAQs | ArcGIS API for JavaScript

roberttilson
Deactivated User

Hi,

Yes that is correct. We have less than a 1000. I think it's similar to what is mentioned here:

http://gis.stackexchange.com/questions/54885/mode-snapshot-or-mode-ondemand-issues-with-both-which-o...

I have to zoom or pan to get all the features to display. I have raised with esri as a support ticket, as I believe this is a bug in the api.

Thanks

0 Kudos