Select to view content in your preferred language

Question about Sample Code

1696
1
Jump to solution
01-26-2016 12:03 PM
YichiLiu1
Regular Contributor

Hi all,

I am new to JavaScript API. This may sounds silly, but I was wondering in sample code Popup content in side panel, why was displayPopupContent called twice (line 103 and line 117)?

The first displayPopupContent is pretty easy to understand. But I commented out the line 117, it did not seem to affect anything.

Thank you!

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Yichi,

   Both lines are needed as onSetFeatures is called when you select features on the map and then onSelectionChange is used when you have selected more than one feature and you have next and previous arrows at the top of the popup.

View solution in original post

1 Reply
RobertScheitlin__GISP
MVP Emeritus

Yichi,

   Both lines are needed as onSetFeatures is called when you select features on the map and then onSelectionChange is used when you have selected more than one feature and you have next and previous arrows at the top of the popup.