Select to view content in your preferred language

WAB Info window hiding Issue

939
4
05-12-2020 03:48 AM
VenkataSrikanth_Dasari
Regular Contributor

Hi,

I am using web app builder for creating custom widgets and there is a requirement user wants to use onclick coordinates even though there is no data on the map. Infowindow is appearing and hiding when there is nothing on the map. How to stop disappearing info window even though there is no data on the map? 

Thanks

Srikanth

Tags (3)
0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus

Srikanth,

   In your widget you can disable popups using this line of code:

this.map.setInfoWindowOnClick(false);
0 Kudos
VenkataSrikanth_Dasari
Regular Contributor

HI Robert,

I just want infowindow appear and stay there.. don't want info window appear and disappear when there is no data.. Please see the video for the issue.

Thanks

Srikanth

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Then I think you want to set the popup visiblewhenempty property to true then

https://developers.arcgis.com/javascript/3/jsapi/popup-amd.html#visiblewhenempty

this.map.infoWindow.visibleWhenEmpty = true;
0 Kudos
VenkataSrikanth_Dasari
Regular Contributor

Excellent. Marvellous .. Mindblowing..

This is a big thing for me.. Simple alternative solution for a already existing big solution.

0 Kudos