Select to view content in your preferred language

Legend is updated incorrectly in 4.16

1550
4
Jump to solution
07-27-2020 04:25 PM
JillCress
Emerging Contributor

Hi,

 

I have a custom layer/legend that uses a separate legend widget for the sublayers in each MapImageLayer. This has worked correctly up through 4.15 but stopped working in 4.16. In 4.16 it initializes correctly but as soon as there is a visibility change the legend images are incorrectly updated.

 

Image 1 shows the correctly initialized layer/legends and Image 2 shows what happens after turning off the “K1 Mountains” sublayer in the first MapImageService. Note the first legend widget correctly removes K1, and correctly maintains the title of the remaining sublayer K1 Mountain Classes BUT the legend is now incorrect (i.e. it shows the K2 Classes legend).

 

Does anyone know of a 4.16 legend change that could be causing this? Are application-based renderers now required? I’ve been using the symbology established in the actual map service rather than creating renderers in the application, could that be causing the problem?

 

Thanks in advance!!

0 Kudos
1 Solution

Accepted Solutions
JillCress
Emerging Contributor

I fixed this by adding client side renderers into my application for all of my sublayers.

Not sure why it worked without renderers in 4.15 but at least now it's working.

View solution in original post

0 Kudos
4 Replies
JillCress
Emerging Contributor

I fixed this by adding client side renderers into my application for all of my sublayers.

Not sure why it worked without renderers in 4.15 but at least now it's working.

0 Kudos
JoelBennett
MVP Regular Contributor

Please see also this thread. I also observed this happening in 4.16, but didn't investigate until after upgrading to 4.17.  I'm fairly certain it's the same problem though.

0 Kudos
KimberlySaballett
Esri Contributor

There is a bug logged for this issue in the ArcGIS API for JavaScript 4.15-4.17. It has been fixed for the API version 4.18 of which you can currently test the pre-release by updating the version to 4.18 in your application's html.

0 Kudos
MichailMarinakis1
Frequent Contributor

Hi Kimberly, 

it looks like the issue remains in the version 4.18. Will it be included in the 4.19?

Thanks in advance!

0 Kudos