I am trying to pass 10000+ points to the export web map gp service. Seems to be breaking because the json gets truncated when trying to pass that many values. Does anyone have a workaround for this issue? Or a way to customize the gp service to allow more features?
Thanks in advance.
Hi Jake,
You should able to change the maximum record by accessing your server admin url:
http://your_domain.com/arcgis/admin/your_service_name/edit and then find find the maxRecordCount in JSON
then you can chnage the number. However, normally we don't recommend set the number too big, it will impact the performance.
Hope this can help.
Hi Yue, Thanks for the suggestion, but it didn't seem to do anything. I changed the maxRecordCount attribute to 10000 records in the CustomPrintService settings area. It is still giving me an error when I try to print my map.
Have you double check how many the maxREcordCount attribute return from the feature service?
Yep I have checked that. Doesn't fix it.
Seems like the Web_Map_as_JSON property that is being passed in the service is too long and is being truncated.
Hi Jake,
Aha, I see. Then you need proxy to fix the issue. Basically, proxy will use POST request instead of GET request. Then all the parameters will not show in the header. For more details, please check this doc: Using the proxy | Guide | ArcGIS API for JavaScript
Also, we have a blog show how to setup proxy. Setting up a Proxy | Support Services Blog
Hope this can help.
We have a proxy setup already and the request is using the post method. It is working now, so it is no longer a big deal. I ended up reducing the number of properties that were being passed by restricting the out_fields property from * down to just a few fields. In doing this, it reduced the overall size of the json object that was being passed to the service and is now allowing me to successfully print my map. Thanks for your help Yue.