AnsweredAssumed Answered

Pop up disappears

Question asked by SIGcorse on Jun 23, 2014
Latest reply on Jun 24, 2014 by SIGcorse

I've been working on a script that simply display a marker on a map which let a pop up appear with some infos on it.

My problem is that my pop up "pop" and instantly "unpop", I've noticed that if I replace the webmap id by a simple map creation, it works..

I can't understand why it doesn't work, here's my code :
Any kind of help/tips would be appreciated, thanks :)

var map,         webmapId = "map id";          require([       "esri/map",       "esri/arcgis/utils",       "dojo/domReady!"       ], function (Map, arcgisUtils) {         arcgisUtils.createMap(webmapId, "mapDiv").then(function (response) {         map =;                         map.on("load", function(){             map.infoWindow.resize(250,100);           });                 var point = new esri.geometry.Point(8.7386350, 41.9192290);                 point = esri.geometry.geographicToWebMercator(point);                 var symbol = new esri.symbol.PictureMarkerSymbol("btb.png", 16, 16);                 var graphic = new esri.Graphic(point, symbol);                 var layer = new esri.layers.GraphicsLayer();                 layer.add(graphic);                 map.addLayer(layer);                  dojo.connect(layer, "onClick", onClick);                                  function onClick(evt) {                     map.infoWindow.setTitle("Test");                     map.infoWindow.setContent(                       "test test test test"                     );           ;                 }      });      });   </script>  </head> <body class="claro">   <div id="mapDiv"></div> </body> </html>