popupTemplate in 4.17 and 4.18

481
0
04-10-2021 05:44 AM
KamilNovák
New Contributor III

Hello,

I have created an app with this code:

 

view.when(function() {
  view.popup.watch("selectedFeature", function(selectedFeature) {
    if(selectedFeature) {
      selectedFeature.popupTemplate = {
        title: "custom title",
        content: "custom content"
      };
      console.log(selectedFeature.popupTemplate.title);
      console.log(selectedFeature.popupTemplate.content);
  }
});

 

It works fine in ArcGIS JS API 4.16. When feature is selected, then popup is open with required title and content.

In 4.17 and also 4.18 it is problem. popupTemplate is set correctly, but popup is open with default content like this:

Image 001.png

Where is the issue with this concept in new versions ArcGIS JS API?
Thanks

Kamil

Tags (2)
0 Kudos
0 Replies