It seems REST API in 10.5 deprecated simple sintax on layerDefs:
Simple syntax is not supported as an expected value for layerDefs parameter starting 10.5.
This is pretty hidden in the documentation by the way...
As a side effect, it seems imageparameter.layerDefinitions no longer works since it still translates requests to the simple sintax:
ImageParameters | API Reference | ArcGIS API for JavaScript 3.19
In our server we get an error when debugging http requests on the browser's console:
{"error":{"code":400,"message":"Invalid 'layerDefs' is specified","details":[]}}
Our code is pretty simple and worked last week against a 10.3 server.
Can anyone reproduce and confirm this?
EDIT: Just to add that the simplest sample from esri does not work against a 10.5 server:
Layer definitions on a dynamic map service | ArcGIS API for JavaScript 3.19
It seems a bug to me... I wish I'm proven wrong...
Thanks.
Solved! Go to Solution.
each service type also has advantages... rendering 100,000 point features is like 10x faster as a dynamicmapservice.
Wish they have a compatibility chart mapping JSAPI methods to ArcGIS Server versions.
Wow. This is a real problem. We use layerDef all over the place. Some apps use jsapi 2.8. It would be good to know how far we may have to roll back the server version to accommodate jsapi 2.8.
3.20 is just released. Seems this bug is solved:
BUG-000102051: The setLayerDefinitions() function against DynamicMa..
Did not test yet. Fingers crossed.
I hope it is, although this bug fix is not mentioned in the What's New section
I just posted my finding about ArcGIS Server patch and didn't see your posting.
I am wondering if ArcGIS Server patch will fix our issue without having to use 3.20.
I have 3.15 version configured locally, if ArcGIS Server patch is fix for something else, I will need to download 3.20 and configure.
I've tested little bit, so far I am able make things to work and I am using 3.15.
So the new ArcGIS Server patch seemed to fix the issue without having to use 3.20. (Not 100% confident yet)
Don
Looks like a patch to fix our issue has been released just few days ago.
Don thanks for the heads up. Didn't notice that one.
I am very happy esri did address this issue. At the same time I strongly feel that esri could have communicated with us - its clients - reassuring they had recognized the issue and were working on it.
On the other hand, 2 months of silent treatment is a bit hard to comprehend...
To the point of the patch - it's much easier to just update arcgis server than to update our web apps. So we will be trying this patch asap.
I am having this same issue, but in 10.5.1 where it was supposedly fixed. The frustrating part is that it only happens on one of my services but is fine on the others. I've tried republishing this service, etc., and have had no luck.
I had it fixed in our 10.5.0 install by applying the patch. I've since updated to 10.5.1 hoping for a more stable release and this issue is happening again.