There are so many people are asking for this change to remove the "no information is available" popup yet ESRI refuses to change it. The default should be that the popup is disabled if the user does not click on a feature. This is just common sense for a user interface.
Anyway, I was able to disable the popup when the user click on one of my features on a graphics layer. Otherwise, the popup is enabled when the user clicks on a feature from our GIS system configured by the GIS team via webmap in Portal. Unfortunately, it still pops up when the user clicks an empty space. I have not found a way to detect a click on empty space and disable it only when that occurs.
var promiseCreateMap = arcgisUtils.createMap(webmapID, "main-map", options);
promiseCreateMap.then(function(response) {
MainPage.map = response.map;
MainPage.clickEventHandle = response.clickEventHandle;
MainPage.clickEventListener = response.clickEventListener;
...
}
// Graphics layer on click event show my own Bootstrap dialog instead of InfoWindow
self.graphicsLayer.on("click", function(evt) {
MainPage.disableInfoWindow();
$('#dialog-irthnet').modal('show');
$(document).on('hide.bs.modal', '#dialog-irthnet', function() {
MainPage.enableInfoWindow();
});
});
MainPage.disableInfoWindow = function() {
// Connect editor
if (MainPage.clickEventHandle) {
dojo.disconnect(MainPage.clickEventHandle);
MainPage.clickEventHandle = null;
}
};
MainPage.enableInfoWindow = function() {
// Disconnect editor
if (!MainPage.clickEventHandle) {
MainPage.clickEventHandle = dojo.connect(MainPage.map, "onClick", MainPage.clickEventListener);
}
};