|
POST
|
Hello. Im having a problem with this, i hope u guys can help me. I have a main app called Lllayllay where i put some title windows adding them as mx component binded with some functions about arcgis map and layers. Now im trying to change the title windows to a popup because i cannot drag them. To do that i read something that i need to change those title windows objects to a mxml component, so when i tried to do that i figure out that my functions binded in the main file the new componenr (the other mxml file) cannot be used. So, how can i call functions from a mxml component that they are being used in the main file? An example is. Main app: A button with click event and a click function to do something with arcgis develop TWindowComp.mxml <?xml version="1.0" encoding="utf-8"?> <mx:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300" xmlns:components="org.example.components.*"> <fx:Script> <![CDATA[ import mx.core.Application; import mx.core.FlexGlobals; import spark.components.Application; protected function exExcelMedidores_clickHandler(event:MouseEvent):void { // TODO Auto-generated method stub } ]]> </fx:Script> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <s:VGroup width="100%" bottom="5" height="100%"> <s:HGroup width="100%" verticalAlign="middle"> <components:SearchBar id="searchBar" width="100%"/> <s:Button id="exExcelMedidores" click="generateXLS()" label="Exportar" width="20%" height="22" /> </s:HGroup> <s:DataGrid id="dgridEquipos" resizableColumns="true" skinClass="dataGridSkin" sortableColumns="true" contentBackgroundAlpha="1" width="100%" height="90%" visible="true" editable="false" bottom="1" click="dgridEquipos_clickHandler(event)" > <s:columns> <s:ArrayList> <s:GridColumn dataField="id_medidor" headerText="ID Equipo"></s:GridColumn> <s:GridColumn dataField="nis" headerText="NIS"></s:GridColumn> <s:GridColumn dataField="luminarias" headerText="Cant. Luminarias"></s:GridColumn> <s:GridColumn dataField="tramos_ap" headerText="Cant. Tramos"></s:GridColumn> <s:GridColumn dataField="tipo_equipo" headerText="Tipo"></s:GridColumn> </s:ArrayList> </s:columns> </s:DataGrid> </s:VGroup> </mx:TitleWindow> The generateXLS function and the dgridEquipos_clickHandler(event) i have them in the main app and i cannot put them out of the main file. So how can i access them? Thx in advice!
... View more
06-26-2014
06:48 AM
|
0
|
1
|
1019
|
|
POST
|
Just change the url to a layer url mapserver/0, mapserver/1, etc Also dont forget to put the visible=true in the layer. Example: For dynamic layer <esri:ArcGISDynamicMapServiceLayer url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/BloomfieldHillsMichigan/Parcels/MapServer"/> Example for Feature layer <esri:FeatureLayer graphicAdd="featurelayer1_graphicAddHandler(event)" outFields="[FIPS,POP2000]" url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/0"> </esri:FeatureLayer> Source: https://developers.arcgis.com/flex/sample-code/using-samples.htm
... View more
06-17-2014
10:01 AM
|
0
|
0
|
657
|
|
POST
|
Hello. Just now im trying to find a way to do this using the ArcGIS Service. 1.- Load a xml file with 1 parameter (ID) (Already done) 2.- Put those ID in a table in a ARCGIS BD. Those ids have to be saved in the table on the arcgis bd. Im making a widget for this job. And i dont have any graphic or something to use applyedits. is it possible? Thanks.
... View more
06-12-2014
11:26 AM
|
0
|
0
|
569
|
|
POST
|
I remember to use only the click event on a map, and then u have to make a rectangular area and see if there is some graphic on it.
... View more
05-06-2014
01:45 PM
|
0
|
0
|
763
|
|
POST
|
rscheitlin Can u please remove the map service url in one of my post? because i tried to talk through private messages but u have them off. Also i have tried to remove it by myself but i can not edit my old post. Thanks. This one is the post. http://forums.arcgis.com/threads/103223-Filling-Datagrid-with-FeatureSet-Values.?p=368108#post368108
... View more
03-10-2014
10:33 AM
|
0
|
0
|
193
|
|
POST
|
Well i just tried for last time the thing with the datagrid and now it works perfectly. Really i dont know what happened before, but that makes me to do and learn a lot of new things about alternative ways to face a problem. I really didnt understand about the trace and debugger and im still learning through googleing. Thanks for all ur tips (:
... View more
02-27-2014
05:31 AM
|
0
|
0
|
1142
|
|
POST
|
rscheitlin, I finally did what i wanted to do with this Attribute table. It is more easy. https://developers.arcgis.com/flex/sample-code/attributetable.htm The only problem that i have now is how to get the value of the cell what was clicked on the attribute table. Even if its the first one or second one. Thanks.
... View more
02-25-2014
01:47 AM
|
0
|
0
|
1142
|
|
POST
|
rscheitlin, It says this C:\WINDOWS\system32\Macromed\Flash\NPSWF32_12_0_0_70.dll
Flash Builder cannot locate the required debugger version of Adobe Flash Player. You might need to install the debugger version of the Flash Player or reinstall Flash Builder.
Do you want to try to debug with the current version?
And if i run the debugger doesnt show anything. And i dont know where the console is located.
... View more
02-24-2014
07:36 AM
|
0
|
0
|
1142
|
|
POST
|
How can i see the trace results? Because im using a trial version of FB.
... View more
02-24-2014
07:20 AM
|
0
|
0
|
1142
|
|
POST
|
rscheitlin, Yes i just tried and it doesnt work. The grid is still in blank.... Is there a way to know the attribute field's name to see if maybe it is that... Thanks for ur patience!
... View more
02-24-2014
07:11 AM
|
0
|
0
|
1142
|
|
POST
|
Yes i just tried and it doesnt work. The grid is still in blank.... Also i tried making another grid but it doesnt work either. Is there a way to know the attribute field's name to see if maybe it is that... Thanks for ur patience!
... View more
02-24-2014
07:08 AM
|
0
|
0
|
1142
|
|
POST
|
No. In the onresult i put this alert to see if the query is going to pass through other side, but it shows the alert "did it", so i assume that the AC has the data given from the featureset. Maybe it is something wrong with the datagrid. I have this on my dgrid. <mx:DataGrid id="gridEquipos" width="30%" height="30%" visible="true" editable="false" dragEnabled="true" dropEnabled="true" itemClick="gridEquipos_itemClickHandler(event)" dataProvider="{listaEquipos}">
<mx:columns>
<mx:DataGridColumn headerText="Código Equipo / Medidor" dataField="ARCGIS.DBO.MEDIDORES_AP_006.id_medidor"/>
</mx:columns>
</mx:DataGrid> and this is the onresult function. function onResult(featureSet:FeatureSet, token:Object = null):void
{
listaEquipos = new ArrayCollection(featureSet.attributes);
Alert.show("did it");
} Thanks for ur patience !
... View more
02-24-2014
06:51 AM
|
0
|
0
|
1066
|
|
POST
|
rscheitlin, I did that already putting the token in the code. The onResult add the features.attributes on the arraycollection, but the grid still doesnt show anything 😞
... View more
02-24-2014
06:33 AM
|
0
|
0
|
1066
|
|
POST
|
rscheitlin, Yeah, you example works perfectly. I tried to change my map and parameters into ur example but i receive an error trying to make a query RPC Fault faultString="Token Required" faultCode="499" faultDetail=""] The map query is http://gisred.chilquinta.cl:5555/arcgis/rest/services/AP_Municipal/AP_LA_CRUZ/MapServer/5 and some of the values that i want to obtain are ARCGIS.DBO.MEDIDORES_AP_006.id_medidor ( type: esriFieldTypeString , alias: id , length: 50 ) ARCGIS.DBO.MEDIDORES_AP_006.propiedad ( type: esriFieldTypeString , alias: propiedad , length: 99 ) i dont know what is happening 😞 Thanks for ur patience ! !
... View more
02-24-2014
04:57 AM
|
0
|
0
|
1066
|
|
POST
|
rscheitlin, Ok i did this , how u said
protected function equiposAP_clickHandler(event:MouseEvent):void
{
//Ver panel medidores
TWMedidores.visible="true";
var queryTaskEquipo:QueryTask = new QueryTask();
queryTaskEquipo.url = "http://gisred.chilquinta.cl:5555/arcgis/rest/services/AP_Municipal/AP_LA_CRUZ/MapServer/5";
queryTaskEquipo.useAMF = false;
var queryEquipo:Query = new Query();
queryEquipo.outFields = ["*"];
queryEquipo.returnGeometry = false;
queryEquipo.where = "1=1";
queryTaskEquipo.execute(queryEquipo, new AsyncResponder(onResult, onFault));
function onResult(featureSet:FeatureSet, token:Object = null):void
{
listaEquipos = new ArrayCollection(featureSet.attributes);
}
function onFault(info:Object, token:Object = null):void
{
Alert.show("no se puede cargar equipo "+ info.toString());
}
gridEquipos.dataProvider(listaEquipos);
}
But i still dont know if it is correct in the grid call the fields like this. In the map server , the fields have those names, but i dont know if the arrayCollection will keep those names or i have to rename them. I did that and my grid still doesnt work.. it doesnt show anything 😞 Thanks for ur help. <mx:DataGrid id="gridEquipos" x="2" y="5" width="100%" height="100%" visible="true" editable="false" dragEnabled="true" dropEnabled="true" itemClick="gridEquipos_itemClickHandler(event)" dataProvider="{listaEquipos}">
<mx:columns>
<mx:DataGridColumn headerText="Código Equipo / Medidor" dataField="ARCGIS.DBO.MEDIDORES_AP_006.id_medidor" id="id_equipo"/>
<mx:DataGridColumn headerText="Tipo Conex." dataField="ARCGIS.DBO.MEDIDORES_AP_006.tipo_conexion" id="tipo_conex"/>
<mx:DataGridColumn headerText="Cant. Tramos" dataField="ARCGIS.DBO.MEDIDORES_AP_006.tramos_ap" id="cant_tramos"/>
<mx:DataGridColumn headerText="Nro. NIS" dataField="ARCGIS.DBO.MEDIDORES_AP_006.nis" id="nro_nis"/>
<mx:DataGridColumn headerText="Cant. Luminarias" dataField="ARCGIS.DBO.MEDIDORES_AP_006.luminarias" id="cant_luminarias"/>
</mx:columns>
</mx:DataGrid>
... View more
02-24-2014
01:55 AM
|
0
|
0
|
1066
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-21-2017 02:09 PM | |
| 1 | 04-10-2015 07:52 AM | |
| 1 | 03-23-2016 02:08 PM | |
| 1 | 02-22-2016 05:01 AM | |
| 1 | 10-09-2018 07:10 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-01-2024
03:05 AM
|