lukepatrick

map infoWindow shows correctly, graphic infoWindow is blank

Discussion created by lukepatrick on Jun 14, 2013
Latest reply on Jun 27, 2013 by lukepatrick
Upon clicking on a map feature (onClick -> Feature select -> onSelection -> go build an infoWindow)

after building my infoWindow and creating a graphic I want to show the infoWindow:

var graphic = new esri.Graphic;
graphic.setGeometry(feature.geometry);
graphic.setAttributes(feature.attributes);
graphic.setSymbol(mySymbol); 

var template = new esri.InfoTemplate();
template.setTitle('MyTitle');
template.setContent(bc.domNode); //dijit BorderContainer

graphic.setInfoTemplate(template);

map.graphics.add(graphic);
map.infoWindow.setContent(template.content);
map.infoWindow.setTitle(template.title);
map.infoWindow.show(graphic.geometry, map.getInfoWindowAnchor(graphic.geometry));


I get the immediate infoWindow to show, the graphic draws fine. Subsequent clicks on the same point shows a blank infoWindow, it only shows data again when I click away then click back on the point to restart the selection process.

Outcomes