kait_davis

unable to apply info template to queried graphics

Discussion created by kait_davis on Oct 17, 2013
I have a query that applies a highlight symbol to the selected map features, but I can't then click on a highlighted graphic and see its popup. The infoTemplate is correct; I am able to get onclick popups on my map features prior the executing my query and calling out the selection graphics. My stategy has been to apply the infoTemplate to the query graphics right before they are added to the map (using setInfoTemplate), but it is not working and all I get when I click on a graphic feature is "this.obj is undefined" in my error console. I'm just trying to understand why setInfoTemplate is failing...

newPolygons = features[0];
console.log("thirdGraphics:", thirdGraphics);
var symbol4 = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 3), new dojo.Color([125,125,125,0.35]));
projectedGraphic1 = new esri.Graphic(newPolygons, symbol4)
projectedGraphic1.setInfoTemplate(infoTemplate);
map.graphics.add(projectedGraphic1);

Outcomes