InfoTemplate w/ IdentifyTask

1851
1
05-22-2010 09:35 PM
JohnCartwright
Occasional Contributor
Hello All,

is there any reason that a InfoTemplate doesn't work w/ an IdentifyTask?  For example,

function addToMap(idResults, evt) {
   var graphic = null;
   for (var i=0, il=idResults.length; i<il; i++) {
      graphic = idResults.feature;
      graphic.setInfoTemplate(infoTemplate);
   }

   map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));
}

displays an empty popup.  I've confirmed that the graphic instance does have an InfoTemplate instance property.  Can someone please point out what I'm missing?

version is AGS Java 10-prerelease.

Thanks!

--john
0 Kudos
1 Reply
DaudiHusbands
New Contributor
Hi John,
Does your graphic actually display on the map? Apparently it's not added to the graphics layer.
How is this code called? Maybe post a more complete bit of code.
Rgs
Daudi
0 Kudos