Hi All,I am selecting a feature on a map via a querystring. I have written code to zoom and center the map on a feature that is selected via a passed in id parameter. I'd like to show an infoWindow for the feature that would be the same as if the user clicked on the feature. I've configured "popupconfig" properties in the main config.xml. I can see all of the attributes of the feature while I'm debugging. Is there a way that I can feed in the popup config and not have to write a bunch of code to display the field names and values? It seems like all of the main pieces are there. I know the layer and have the attributes, but how can I use the popupconfig to populate the infoWindow? Code is below, but I'd be willing to do this differently if there is a better way. Thanks!
function onResult(featureSet:FeatureSet, token:XMLList = null):void
{
try
{
var mp:MapPoint = featureSet.features[0].geometry;
// set the map scale and center
map.scale = 36112;
map.centerAt(mp);
var fs:FeatureSet = featureSet;
// use the layername (layerproperties.name) as the title - HERE IS WHERE I'D LIKE TO USE THE POPUP CONFIGURATION TO POPULATE THIS !
var popUpInfo:PopUpInfo = new PopUpInfo();
popUpInfo.title = lp.name;
popUpInfo.description = "Field Names and Values Go Here!"
var popUpRenderer:PopUpRenderer = new PopUpRenderer();
popUpRenderer.popUpInfo = popUpInfo;
// show the infoWindow at the point
map.infoWindow.content = popUpRenderer;
map.infoWindow.closeButtonVisible = false;
map.infoWindow.show(mp);
}
catch (error:Error)
{
Alert.show(error.message);
}
}