Hello, I have a dynamic service with three layers and I would like to use a custom info window for each layer. I have declared the info window renders in the MXML and used an identify task to return the features. However, the info window that displays is the default window. Here is the mxml declaration:
<esri:ArcGISDynamicMapServiceLayer id="legLayers" url="http://myurl/arcgis/rest/services/legislative25/MapServer/"> <esri:layerInfoWindowRenderers> <esri:LayerInfoWindowRenderer > <esri:infoWindowRenderer> <fx:Component> <esri:LabelDataRenderer label="State House"> <s:VGroup paddingBottom="5" paddingLeft="5" paddingRight="5" paddingTop="5"> <s:Label text="District: {data.DISTRICT}"/> <s:Label text="Representative: {data.NAME}"/> <s:Label text="Email: {data.Email}"/> <s:Label text="Affiliation: {data.Party}"/> </s:VGroup> </esri:LabelDataRenderer> </fx:Component> </esri:infoWindowRenderer> ... SIMILAR SECTIONS FOR THE NEXT TWO LAYERS </esri:ArcGISDynamicMapServiceLayer>
And the code for displaying the identify results
private function myResultFunction(results:Array, token:Object = null):void { if (results && results.length > 0){ var list:ArrayList = new ArrayList(); for (var i:int = 0; i < results.length; i++){ var result:IdentifyResult = results; list.addItem(result.feature); } contentNavigator.dataProvider = list; myMap.infoWindowContent = contentNavigator; myMap.infoWindow.show(clickLocation); } myMap.defaultGraphicsLayer.clear(); }