gorm1267

Identify Results 2.2 getContent

Discussion created by gorm1267 on Mar 18, 2011
Latest reply on Mar 21, 2011 by khutchins-esristaff
is there a but with the getContent method on the Identify Resutls in javascript version 2.2.
using this tag...
<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.2"></script>

and then calling ...

function addToMap(idResults, evt) {
    Results = { displayFieldName: null, features: [] };
    //    parcelResults = { displayFieldName: null, features: [] };
    var tc = new dijit.layout.TabContainer({ style: "height: 100%; width: 100%;" });
    try {
        for (var i = 0, il = idResults.length; i < il; i++) {
            var idResult = idResults[i];
            if (idResult.layerId === 11) {
                if (!Results.displayFieldName) { Results.displayFieldName = idResult.displayFieldName };
                Results.features.push(idResult.feature);
                //Results.features[i].getContent()
//*************content is nulll at this point
                var content = Results.features[i].getContent();
                PID = Results.features[i].attributes['Parcel ID #'];
                saleTab = new dijit.layout.ContentPane({
                    title: "PID: " + PID,
                    content: content
                });
                tc.addChild(saleTab);
            }
        }
    }
    catch (Error) {
   
    }
    tc.startup();
    map.infoWindow.setTitle("Identify Results");
    map.infoWindow.width = 600;
   
    map.infoWindow.setContent(tc.domNode);
    // map.infoWindow.setContent(dijit.byId("tabs").domNode);
   // map.infoWindow.resize(315, 315);
    //map.infoWindow.setTitle(idResults.displayFieldName);
    showInfo(evt);
    //map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint));
}

guess its back to version 2.1

Outcomes