Solved! Go to Solution.
// this function called when the widget's configuration is loaded private function init():void { // build the layer to hold the graphics graphicsLayer = new GraphicsLayer(); graphicsLayer.visible = false; graphicsLayer.renderer = new SimpleRenderer(mySymbol); graphicsLayer.clusterer = clusterer; map.addLayer(graphicsLayer); // get pop-up fields from the config file xmlPopupFields = configXML.popup.fields.field; xmlPopupTitle = configXML.popup.title; // array to hold popup fields for assignment to popUpFieldInfos var popupFields:Array = []; // Create the pop-up field infos from each field in the config XML for each (var field:Object in xmlPopupFields) { var popupFieldInfo:PopUpFieldInfo = new PopUpFieldInfo(); popupFieldInfo.fieldName = field.name; popupFieldInfo.label = field.alias; popupFieldInfo.visible = true; popupFields.push(popupFieldInfo); } // Create the pop-up info var popUpInfo:PopUpInfo = new PopUpInfo(); // Tell the pop-up info about the field name template popUpInfo.title = "{" + xmlPopupTitle + "}"; popUpInfo.popUpFieldInfos = popupFields; // Create the class factory var popUpRenderer:ClassFactory = new ClassFactory(PopUpRenderer); // Set the "popUpInfo" key popUpRenderer.properties = { "popUpInfo": popUpInfo }; // Set the info window renderer to use the pop-up renderer graphicsLayer.infoWindowRenderer = popUpRenderer; // get counties starts the init chain of events getCounties(); } // this function called when the widget's configuration is loaded private function init():void { // build the layer to hold the graphics graphicsLayer = new GraphicsLayer(); graphicsLayer.visible = false; graphicsLayer.renderer = new SimpleRenderer(mySymbol); graphicsLayer.clusterer = clusterer; map.addLayer(graphicsLayer); // get pop-up fields from the config file xmlPopupFields = configXML.popup.fields.field; xmlPopupTitle = configXML.popup.title; // array to hold popup fields for assignment to popUpFieldInfos var popupFields:Array = []; // Create the pop-up field infos from each field in the config XML for each (var field:Object in xmlPopupFields) { var popupFieldInfo:PopUpFieldInfo = new PopUpFieldInfo(); popupFieldInfo.fieldName = field.name; popupFieldInfo.label = field.alias; popupFieldInfo.visible = true; popupFields.push(popupFieldInfo); } // Create the pop-up info var popUpInfo:PopUpInfo = new PopUpInfo(); // Tell the pop-up info about the field name template popUpInfo.title = "{" + xmlPopupTitle + "}"; popUpInfo.popUpFieldInfos = popupFields; // Create the class factory var popUpRenderer:ClassFactory = new ClassFactory(PopUpRenderer); // Set the "popUpInfo" key popUpRenderer.properties = { "popUpInfo": popUpInfo }; // Set the info window renderer to use the pop-up renderer graphicsLayer.infoWindowRenderer = popUpRenderer; // get counties starts the init chain of events getCounties(); }