Hi,
This is what I've coded to create a popup:
map = new Map("map", {
basemap : "streets",
slider : true,
infoWindow : popup
});
...
popup = new Popup({
titleInBody : false,
visibleWhenEmpty : false,
hideDelay : 0
}, domConstruct.create("div"));
...
var popupTemplate = new PopupTemplate({
title : "STAT_NAME: {STAT_NAME}",
description : "<b>STAT_CODE: </b>{STAT_CODE}<br>",
});
...
The popup works as expected: When I click an object of my feature layer, I get a popup showing the description of this object.
But when I click the basemap, I would expect the popup to disappear, because I've set "visibleWhenEmpty: false" and "hideDelay : 0". But this part doesn't work: I just get a popup telling me "no information available".
What's the trick?
Regards, Tobias