How to disable popup in the Search widget using popupEnabled in JavaScript API 4.4?

1428
1
08-04-2017 02:57 PM
FernandoVara
New Contributor

Hello,

I am trying to work with the Search widget example in ArcGIS JavaScript API 4.4 (Search Widget | ArcGIS API for JavaScript 4.4 ) and I am not able to disable the popup with popupEnabled property. Using version 4.3 of the API is working. Is this a bug?

The example in the documentation that i am trying to use is:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no">
<title>Search Widget - 4.4</title>

<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>

<link rel="stylesheet" href="https://js.arcgis.com/4.4/esri/css/main.css">
<script src="https://js.arcgis.com/4.4/"></script>

<script>
require([
"esri/Map",
"esri/views/SceneView",
"esri/widgets/Search",
"dojo/domReady!"
], function(
Map,
SceneView,
Search) {

var map = new Map({
basemap: "satellite",
ground: "world-elevation"
});

var view = new SceneView({
scale: 123456789,
container: "viewDiv",
map: map
});

var searchWidget = new Search({
view: view,
popupEnabled: false
});

// Add the search widget to the very top left corner of the view
view.ui.add(searchWidget, {
position: "top-left",
index: 0
});
});
</script>
</head>

<body>
<div id="viewDiv"></div>
</body>

</html>

Thanks,

1 Reply
MohamedShefeek
New Contributor

 Make enableInfoWindow: false   In Search

var search = new Search({
map: map,
enableLabel: true,
enableInfoWindow: false,
popupEnabled: false
}, "search");

0 Kudos