Select to view content in your preferred language

JS 4.15 - popupTemplate in MapImageLayer.sublayers is not working

501
2
04-22-2020 05:37 AM
Shun_HuiLee
New Contributor

When there is a popupTemplate at the last item of the sublayers (id: 1), the popup won't work and error will be thrown from init.js:2129.

No error when I remove the popupTemplate for sublayers id 1 only. 

This only happen after we upgrade ArcGIS API for JavaScript from 4.14 to 4.15.

This is my sample code:

new MapImageLayer({
   url: '...',
    sublayers: [
       {
          id: 3,
          title: 'A',
          popupTemplate: {...}
       },
       {
          id: 2,
          title: 'B',
          popupTemplate: {...}
       },
       {
          id: 1,
          title: 'C',
          popupTemplate: {...}
        }
   ]
 });
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
0 Kudos
2 Replies
Noah-Sager
Esri Regular Contributor

Can you share a function test app that shows this? I tested and could not reproduce.

0 Kudos
Shun_HuiLee
New Contributor

Sorry, I don't have a test app to show that. We are building that app via React.

0 Kudos