The popup widget is now the default info window for the map. Most ArcGIS API for JavaScript users prefer the popup's look and feel and, after some refactoring some internal dependencies, using the popup as the default makes sense. Additional changes to the popup include: easier to place the popup in a container outside the map, better support for right-to-left content and several new config options to control paging controls and how features are highlighted
Solved! Go to Solution.
var map = new esri.Map("map", { basemap: "streets", center: [-98.215, 38.382], zoom: 7 }); var infoWindow = new esri.esri.dijit.InfoWindow({}, dojo.create("div", null, map.root)); infoWindow.startup(); map.setInfoWindow(infoWindow);
var map = new esri.Map("map", { basemap: "streets", center: [-98.215, 38.382], zoom: 7 }); var infoWindow = new esri.esri.dijit.InfoWindow({}, dojo.create("div", null, map.root)); infoWindow.startup(); map.setInfoWindow(infoWindow);
define(["dojo/dom-construct", "esri/dijit/InfoWindow", "esri/map"], function(domConstruct, InfoWindow, Map) { var infoWindow = new InfoWindow({}, domConstruct.create("div", null, "map")); infoWindow.startup(); var map = new Map("map", { infoWindow: infoWindow }); } );
map = new esri.Map("mapDiv", { extent: initialExtent, logo: false, fadeOnZoom: true }); var infoWindow = new esri.esri.dijit.InfoWindow({}, dojo.create("div", null, map.root)); infoWindow.startup(); map.setInfoWindow(infoWindow);
dojo.require("esri.dijit.InfoWindow");
Here's a code snippet showing how to use the old info window instead of the popup. Note that the sample points to esri.esri.dijit.InfoWindow at the next version of the api (3.5) we'll fix this so you just need to enter esri.dijit.InfoWindow.var map = new esri.Map("map", { basemap: "streets", center: [-98.215, 38.382], zoom: 7 }); var infoWindow = new esri.esri.dijit.InfoWindow({}, dojo.create("div", null, map.root)); infoWindow.startup(); map.setInfoWindow(infoWindow);