5

I am able to add shapefiles with less than 1000 points by using the ArcGIS Portal REST API as shown in this example: https://developers.arcgis.com/javascript/jssamples/portal_addshapefile.html

However, there is a 1000 point maxRecordCount through their service. I have tried setting the maxRecordCount in the publishParameters without any luck. I also thought it may be possible to publish our own service with a raised maxRecordCount, but I am not very experienced in publishing custom scripts and did not know whether there was a toolbox that already provided this functionality.

So my question is, is there a way to use the ArcGIS Portal REST API to return more than 1000 records? If not, what would be the best approach to solve this problem?

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Oct 22, 2014 at 14:57
1

2 Answers 2

1

yes, it is possible to manipulate the maxRecordCount of hosted services in ArcGIS Online/Portal/Server. Administering ArcGIS Online hosted services - Update Definition: Feature Layer http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Update_Definition_Feature_Layer/02r30000022p000000/

example url:

http://services.myserver.com/ERmEceOGq5cHrItq/ArcGIS/rest/admin/services/example5/FeatureServer/1/updateDefinition

example POST body:

{ "maxRecordCount" : 2000 }

Its worth noting though that displaying thousands of individual geometries and their corresponding attributes at one time does not typically lend itself to the best user experience possible. Using scale dependency or some other mechanism to avoid this is worth considering.

answered Oct 23, 2014 at 16:52
2
  • I believe that this rest-based functionality updates the FeatureServer service definition. It is not applicable to feature collections added directly to maps (from Shapefiles) via the Javascript API described in the question. Commented Jan 29, 2015 at 23:22
  • 1
    Bottom line: either ArcGIS Server or an Organizational Subscription for AGOL is required so that a Feature Service can be created.--that's what you need in order to manage record counts flexibly. Simply uploading a shapefile into a map as a feature collection will unavoidably hit the 1000 feature limit. Commented Jan 29, 2015 at 23:29
0

If I understand correctly you want to upload shapefiles (>1000 features) with the ArcGIS Javascript Api?

If you look at the sample code you see the following lines of code:

var params = {
 'name': name,
 'targetSR': map.spatialReference,
 'maxRecordCount': 1000,
 'enforceInputFileSizeLimit': true,
 'enforceOutputJsonSizeLimit': true
 };

Adjust the 'maxRecordCount' value and it should work.

answered Jan 6, 2016 at 9:39

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.