imageparameters.layerDefs does not work with 10.5

10873
44
Jump to solution
01-10-2017 10:14 AM
DuarteCarreira
Occasional Contributor II

It seems REST API in 10.5 deprecated simple sintax on layerDefs:

ArcGIS REST API 

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.

44 Replies
JordanPorter
New Contributor III

each service type also has advantages... rendering 100,000 point features is like 10x faster as a dynamicmapservice. 

DeanChiang
Occasional Contributor

Wish they have a compatibility chart mapping JSAPI methods to ArcGIS Server versions.

ChetEgbert1
New Contributor II

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.

DuarteCarreira
Occasional Contributor II

3.20 is just released. Seems this bug is solved:

BUG-000102051: The setLayerDefinitions() function against DynamicMa.. 

Did not test yet. Fingers crossed.

0 Kudos
KenBuja
MVP Esteemed Contributor

I hope it is, although this bug fix is not mentioned in the What's New section

0 Kudos
DonKang
New Contributor III

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

0 Kudos
DonKang
New Contributor III

Looks like a patch to fix our issue has been released just few days ago.

http://support.esri.com/download/7489

DuarteCarreira
Occasional Contributor II

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.

0 Kudos
JeremyRead1
New Contributor III

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.

JeremyBeeler
New Contributor

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.