Amigos tengo el siguiente problema: tengo una capa la cual quiero consultar por el campo nombre y dirección y ver el resultado en un datagrid, ejecuto el scrip en flex y me ejecuta correctamente pero cuado selecciono la capa no me muestra los datos nombre y dirección.
adjunto el código para q lo miren:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
minWidth="955" minHeight="600"
xmlns:esri="http://www.esri.com/2008/ags">
<fxeclarations>
<esri:QueryTask id="queryTask" url="http://trainingcloud.arcgis.com/ArcGIS/rest/services/Redlands_PointsOfInterest/MapServer/0"/>
<esri:Query id="queryParam"
where=" TYPE='{typesChoose.selectedItem}'"
returnGeometry="true"
outSpatialReference="{mainMap.spatialReference}">
<esriutFields>
<fx:String>NAME</fx:String>
<fx:String>Match_addr </fx:String>
</esriutFields>
</esri:Query>
</fxeclarations>
<esri:Map id="mainMap">
<esri:extent>
<esri:Extent xmax="-13042545.481" ymax="4037310.383" xmin="-13046367.332" ymin="4034443.994">
<esri:SpatialReference wkid="102100"/>
</esri:Extent>
</esri:extent>
<esri:ArcGISTiledMapServiceLayer url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
<esri:GraphicsLayer id="myGraphicsLayer" graphicProvider="{queryTask.executeLastResult.features}">
<esri:renderer>
<esri:SimpleRenderer>
<esri:SimpleMarkerSymbol id="basicSymbol"
color="0xff0000"
style="diamond">
</esri:SimpleMarkerSymbol>
</esri:SimpleRenderer>
</esri:renderer>
</esri:GraphicsLayer>
</esri:Map>
<s:Panel id="mainPanel"
top="50"
right="50"
width="250"
height="300"
title="Componente"
>
<s:layout>
<s:VerticalLayout paddingLeft="10"
paddingRight="10"
paddingTop="10"
paddingBottom="10">
</s:VerticalLayout>
</s:layout>
<s:ComboBox id="typesChoose"
selectedItem=" "
change="queryTask.execute(queryParam)"
width="75%">
<s:ArrayCollection>
<fx:String>Shopping</fx:String>
<fx:String>Restaurant</fx:String>
<fx:String>Apartament</fx:String>
<fx:String>Arts</fx:String>
<fx:String>Bank</fx:String>
<fx:String>Historic</fx:String>
<fx:String>Recreation</fx:String>
</s:ArrayCollection>
</s:ComboBox>
<mxataGrid id="resultGrid"
color="red"
width="100%"
height="100%"
dataProvider="{queryTask.executeLastResult.features}">
<mx:columns>
<mxataGridColumn headerText="Name" dataField="OBJECTID" />
<mxataGridColumn headerText="Address" dataField="Match_addr" color="red"/>
</mx:columns>
</mxataGrid>
</s:Panel>
</s:Application>

eclarations>
utFields>
Reply With Quote


Bookmarks