POST
|
Hi All, I have a custom GP Service. It returns two results (esriGPParameterDirectionOutput) a FeatureSet of points (GPFeatureRecordSetLayer) and a RecordSet (GPRecordSet) of summary statistics about those points. I am successfully able to access and symbolize the points and bring the attributes into a datagrid. I'm not sure, though, how to access the second result. (which will go into a separate datagrid) Here's what I have working so far -- just accessing the point results and displaying them. I left out the code to put the attributes into a datagrid, but that's working, too. protected function gp_jobCompleteHandler(event:GeoprocessorEvent):void
{
if (event.jobInfo.jobStatus == JobInfo.STATUS_SUCCEEDED)
{
gp.addEventListener(GeoprocessorEvent.GET_RESULT_DATA_COMPLETE, onGetResult);
gp.getResultData(gp.submitJobLastResult.jobId, "Result");
var messages:Array = event.jobInfo.messages;
var count:int = messages.length;
var index:int = count-2;
var message:String = messages[index].description;
statusArea.appendText(message + "\n");
statusArea.appendText("Drawing result graphics..." + "\n");
}
else
{
var messages1:Array = event.jobInfo.messages;
var count1:int = messages1.length;
var index1:int = count1-4;
var message1:String = messages1[index1].description;
statusArea.appendText(message + "\n");
Alert.show("Geoprocessing Error:\n" + message1);
}
} and then: protected function onGetResult(event : GeoprocessorEvent) : void
{
myGraphicsLayer.renderer = ResultRenderer();
var pv:ParameterValue = event.parameterValue;
fs = new FeatureSet;
fs = pv.value as FeatureSet;
for each(var graphic:Graphic in fs.features)
{
graphic.addEventListener(MouseEvent.CLICK, graphic_clickHandler);
graphic.addEventListener(MouseEvent.DOUBLE_CLICK, graphic_doubleClickHandler)
myGraphicsLayer.add(graphic);
}
map.addLayer(myGraphicsLayer);
var resultAttribute:Array = fs.attributes;
resultAttributes= new ArrayCollection(resultAttribute);
CursorManager.removeBusyCursor();
} Here's what I'm trying to do: protected function gp_jobCompleteHandler(event:GeoprocessorEvent):void
{
if (event.jobInfo.jobStatus == JobInfo.STATUS_SUCCEEDED)
{
gp.addEventListener(GeoprocessorEvent.GET_RESULT_DATA_COMPLETE, onGetResult);
gp.getResultData(gp.submitJobLastResult.jobId, "Result");
gp.getResultData(gp.submitJobLastResult.jobId, "SummaryStats");
var messages:Array = event.jobInfo.messages;
var count:int = messages.length;
var index:int = count-2;
var message:String = messages[index].description;
statusArea.appendText(message + "\n");
statusArea.appendText("Drawing result graphics..." + "\n");
}
else
{
var messages1:Array = event.jobInfo.messages;
var count1:int = messages1.length;
var index1:int = count1-4;
var message1:String = messages1[index1].description;
statusArea.appendText(message + "\n");
Alert.show("Geoprocessing Error:\n" + message1);
}
} and then: protected function onGetResult(event : GeoprocessorEvent) : void
{
myGraphicsLayer.renderer = ResultRenderer();
var pv:ParameterValue = event.parameterValue;
var pv2:ParameterValue = event.parameterValue; // This seems wrong -- how do I tell it to take the second of the output parameters?
fs = new FeatureSet;
fs = pv.value as FeatureSet;
rs = new RecordSet; // This doesn't work. "RecordSet" isn't an option
rs = pv2.value as RecordSet; // This obviously doesn't work either
for each(var graphic:Graphic in fs.features)
{
graphic.addEventListener(MouseEvent.CLICK, graphic_clickHandler);
graphic.addEventListener(MouseEvent.DOUBLE_CLICK, graphic_doubleClickHandler)
myGraphicsLayer.add(graphic);
}
map.addLayer(myGraphicsLayer);
var resultAttribute:Array = fs.attributes;
resultAttributes= new ArrayCollection(resultAttribute);
var sumStatsAttribute = rs.attributes; // This obviously isn't working since 'rs' isn't working
sumStatsAttributes = new ArrayCollection(sumStatsAttribute);
CursorManager.removeBusyCursor();
} Do I need a separate event listener for the SummaryStats table? As always, any advice would be greatly appreciated. Thanks, -Erik
... View more
04-15-2013
06:09 AM
|
0
|
3
|
563
|
POST
|
The contents of my TOCWidget.xml now read: <configuration>
<labels>
<visibilitylabel>Layer Visibility</visibilitylabel>
<zoomtoextent>Zoom To Layer Extent</zoomtoextent>
<expandall>Expand All Layers</expandall>
<collapseall>Collapse All Layers</collapseall>
<zoomtomakevisible>Zoom To Make Visible</zoomtomakevisible>
<generatinglegendmsg>Generating TOC Legend</generatinglegendmsg>
</labels>
<tocsettings>
<expanded everything="false">false</expanded>
<collapselegends>true</collapselegends>
<disablezoomtomenuoption>true</disablezoomtomenuoption>
</tocsettings>
<legendtimeout>10</legendtimeout>
<excludelayers>
<excludelayer url="http://maps.myserver.com/mapstest/rest/services/Project/Test/MapServer" id="1"/>
</excludelayers>
<excludegraphiclayers>true</excludegraphiclayers>
<excludebasemaplayers>true</excludebasemaplayers>
<usenewesridescription>false</usenewesridescription>
</configuration> I also tried <excludelayer mapservice="Layers">1</excludelayer> With both configurations, Layer 1 from my map service is still showing p in the TOC. More significantly, the FeatureLayer that is created from MapService Layer 1 in AS & added to the map (via a separate custom widget) is showing up in the TOC as "FeatureLayer774". Then, when I remove that FeatureLayer from the map via AS, the TOC throws an error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at widgets.TOC.toc.tocClasses::TocMapLayerItem/filterOutSubLayer()
at widgets.TOC.toc.tocClasses::TocMapLayerItem/processLegend()
at Function/<anonymous>()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at HTTPOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()
at mx.rpc::Responder/result()
at mx.rpc::AsyncRequest/acknowledge()
at DirectHTTPMessageResponder/completeHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/onComplete()
Is there something obvious I'm missing?
... View more
03-28-2013
04:32 PM
|
0
|
0
|
467
|
POST
|
Robert, Is there a way to exclude FeartureLayers from the TOC widget? I've messed around with the order in TOC.as, following your message above to Jim, but have not figured out how to exclude them altogether. Thanks, as always! -Erik
... View more
03-28-2013
09:19 AM
|
0
|
0
|
467
|
POST
|
Thanks, Bjorn -- glad I came across this thread before too much longer...
... View more
03-27-2013
11:41 AM
|
0
|
0
|
679
|
POST
|
Thanks Matthew... your edited solution worked. The two pieces I needed to change were resetting the index back to 0 for each row and using the while loop instead of the for loop. As I'm interpreting this, the problem with the for loop would be that it was still trying to advance by two fields even for the last field, when of course there are no fields after the last field (using the for loop even with the index set to 0 for each row still results in a "list index out of range" error.). Also, for the record, the data access cursor was far faster than the field calculator in my case with 51 pairs of fields & 4000 records. The data access cursor took 1 second. The field calculator took 73 seconds... a much bigger difference than I expected and really significant for a web application (this is feeding an asynchronous GP service). Thanks for the help! -Erik
... View more
02-28-2013
03:44 AM
|
0
|
0
|
462
|
POST
|
I've done something very similar. My code was for 10.0, but it still works in 10.1. I'm not sure if there's a new, better way to do this, but here's the relevant section of my code:
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
arcpy.MakeFeatureLayer_management("myFC", "My Layer Name")
addLayer = arcpy.mapping.Layer("My Layer Name")
arcpy.mapping.AddLayer(df,addLayer, "TOP")
sourceLayer = "C:\Data\MySymbology.lyr"
layerSymb = arcpy.mapping.Layer(sourceLayer)
updateLayer = arcpy.mapping.ListLayers(mxd, "My Layer Name", df)[0]
arcpy.mapping.UpdateLayer(df, updateLayer, layerSymb, "TRUE")
arcpy.RefreshTOC()
Hope that helps... -Erik
... View more
02-27-2013
11:19 AM
|
0
|
0
|
374
|
POST
|
I notice the last post on this topic was from January. Has anybody come across a script that can automate the accumulate attributes process? Jon Don't know if you're still looking for this, but I ended up scripting something using the Geometric Network tools (available as a toolbox in 10.1) and an arcpy.da cursor. It takes a while to run (~30hours to run my stream network of 410,000 segments) but that's actually a little faster than the performance I was getting using ArcHydro's Accumulate Attributes. Let me know if you're still interested...
... View more
02-27-2013
11:00 AM
|
0
|
0
|
551
|
POST
|
I'm working with an arcpy data access update cursor with a lot of fields that have an old/new pattern (e.g. oldField1, newField1, oldField2, newField2, etc. I have a very simple operation I'd like to do -- calculate the newField = oldField for each pair. I know I could use CalculateField_management, which is actually what I had been doing previously. But there are conflicting reports as to which is faster -- da.UpdateCursor or CalculateField. I am trying to optimize speed, so I want to try this out. The root of my question: is there a way to use a variable instead of the list index in a da cursor. Specifically: import arcpy FC = "C:\\data\\test.gdb\\test" fields = ["newField1", "oldField1", "newField2", "oldField2", "newField3", "oldField3", .... "newFieldn", "oldFieldn"] #There are actually a lot more fields in this same new/old pattern with arcpy.da.UpdateCursor(FC, fields) as rows: i = 0 for row in rows: j = i + 1 row = row #simply setting the new value = old value for each old/new pair, but get "list index out of range" error i = i + 1 I know I could take the actual index for each (eg row[0] = row[1], then row[2] = row[3] the next time, etc) but that would be messy with so many fields. With the old cursors, I could have done something like the following, but the old cursors are definitely slower than CalculateField_management, so this is not worth pursuing: baseFieldNameList = ["Field1", "Field2", "Field3", ... "Fieldn") rows = arcpy.UpdateCursor for field in baseFieldNameList: newField = "new" + field oldField = "old" + field oldValue = row.getValue(oldField) row.setValue(newField, oldValue) rows.updateRow del rows, row Any suggestions, workarounds, or input would be much appreciated. Thanks, -Erik
... View more
02-27-2013
10:52 AM
|
0
|
2
|
3066
|
POST
|
I've been having problems with the 64bit background geoprocessing if I run the script in ArcMap and have any of the layers involved in the script in the dataframe. When I remove everything from the MXD, the script will work.
... View more
11-19-2012
11:49 AM
|
0
|
0
|
285
|
POST
|
I have a Python script that loops through the Trace Geometric Network tool for a set of flags. I recently installed the 64-bit background geoprocessing which seems to have introduced a problem with the "out_network_layer" parameter. It appears as though the out_network_layer name can not be overwritten in the background service. (I am not adding the layer to the active dataframe-- it appears as though it can't be overwritten in the background geoprocessing instance of ArcMap). So, with background geoprocessing turned on this script works on the first iteration, then crashes in subsequent iterations:
import arcpy
Workspace = "C:\\Data\\Test.gdb"
network = "C:\\Data\\Test.gdb\\Hydro\\Hydro"
flags = "flagPoints"
arcpy.env.overwriteOutput = True
arcpy.env.workspace = Workspace
flagUniqIDs = []
fields = ("FLAG_ID")
with arcpy.da.SearchCursor(flags, fields) as rows:
for row in rows:
flagUniqID = row[0]
flagUniqIDs.append(flagUniqID)
for flagUniqID in flagUniqIDs:
selection = "\"FLAG_ID\" = \'%s\'" %flagUniqID
arcpy.Select_analysis(flags, "flag", selection)
flag = "flag"
arcpy.TraceGeometricNetwork_management(network, "netLayerName", flag, "TRACE_DOWNSTREAM") If I go to the GP results and add the output of the TraceGeometricNetwork tool, the layer group gets added, but it can't find the data (little red exclamation points). I have devised a workaround that creates a new name for each iteration and it seems to work, but I wonder what's getting cluttered up in the background and slowing things down... especially if there are lots of flags (in some cases, I may have several hundred.) import arcpy
Workspace = "C:\\Data\\Test.gdb"
network = "C:\\Data\\Test.gdb\\Hydro\\Hydro"
flags = "flagPoints"
arcpy.env.overwriteOutput = True
arcpy.env.workspace = Workspace
flagUniqIDs = []
fields = ("FLAG_ID")
with arcpy.da.SearchCursor(flags, fields) as rows:
for row in rows:
flagUniqID = row[0]
flagUniqIDs.append(flagUniqID)
count = 0
for flagUniqID in flagUniqIDs:
count = count +1
selection = "\"FLAG_ID\" = \'%s\'" %flagUniqID
arcpy.Select_analysis(flags, "flag", selection)
flag = "flag"
netLayerName = "netLayerName%s" %count
arcpy.TraceGeometricNetwork_management(network, netLayerName, flag, "TRACE_DOWNSTREAM")
del flagUniqID, flagUniqIDs If I run the same script with background geoprocessing turned off it works for the whole set of flags. Prior to the 64-bit GP update, it worked in background geoprocessing for the whole set of flags. Has anyone else experienced this? Bug? Thanks, -Erik
... View more
11-15-2012
09:52 AM
|
0
|
0
|
456
|
POST
|
FYI, this was confirmed by Esri support to be a bug in ArcGIS 10 SP5, but it has been fixed in 10.1: This is Sai from Esri Tech Support and I have taken ownership of your incident #1086756. Thank you for providing the forum link and the code for testing. I was able to reproduce the same issue at my end in ArcGIS v10.0 SP5 (It works fine with a shapefile and not with a Geodatabase feature class). However, when I tested the same issue with v10.1, I was able to confirm that this has already been fixed.
... View more
10-17-2012
04:14 AM
|
0
|
0
|
224
|
POST
|
I am having a problem with a file geodatabase join (2 feature classes) that is not happening when I use shapefiles. I am using ArcGIS 10 SP5. Here is my problem & workflow. Take Feature Class 1 and add a new field calculate that field to equal an existing field join the feature class to Feature Class 2 use select by attributes to create a selection calculate the new field to equal something else, for only the selected records. The new value is the sum of 2 fields of the same name in the 2 feature classes clear the selection and remove the join The problem is that after I calculate the new field to equal something new, all of the old values (calculated in step 2) are set to null for records that do not join. Here is my code: import arcpy Workspace = r"C:\Users\me\Desktop\test.gdb" arcpy.env.overwriteOutput = True arcpy.env.workspace = Workspace FC = "PointFC1" FC2 = "PointFC2" arcpy.AddField_management(FC, "newAttributeX", "DOUBLE") arcpy.CalculateField_management(FC, "newAttributeX", '[AttributeX]') arcpy.MakeFeatureLayer_management(FC, "FC_lyr") FC_lyr = "FC_lyr" #Join FCs and create selection arcpy.AddJoin_management(FC_lyr, "JoinField", "FC2", "JoinField") selection = '"%s.OBJECTID" IS NOT NULL' %FC2 arcpy.SelectLayerByAttribute_management(FC_lyr, "NEW_SELECTION", selection ) #Calc values for newAttributeX that join to second FC expression = "[%s.AttributeX] + [%s.AttributeX]" %(FC, FC2) arcpy.CalculateField_management(FC_lyr, "%s.newAttributeX" %FC, expression) arcpy.SelectLayerByAttribute_management(FC_lyr, "CLEAR_SELECTION") arcpy.RemoveJoin_management (FC_lyr, "FC2") Again, everything up to the selection is working properly... the problem is that all the null values (from those records that didn't join) are copied over to the new field, when in fact the field calculation should only be working on the selected records. A viable work around is to wait to calculate the old values until the end: Take Feature Class 1 and add a new field join the feature class to Feature Class 2 use select by attributes to create a selection calculate the new field to equal something else, for only the selected records. The new value is the sum of 2 fields of the same name in the 2 feature classes clear the selection and remove the join select the values in the new field that didn't join calculate the null values in the new field to equal the values an existing field However, the behavior I am getting is contrary to the documentation -- only the selected records should be calculated. And as i mentioned above, this problem is not happening when I use 2 shapefiles. Anyone else come across this problem? -Erik
... View more
10-12-2012
09:45 AM
|
0
|
2
|
2361
|
POST
|
Are coded domains supported in GP Service results through REST (ArcGIS Server 10.0)? I have a GP Service, and when I run it via an ArcMap toolbox (add the GP service as a toolbox), the coded domains show up in the results as they're supposed to. However, they do not show up in the GP Service results when I run it via REST (either directly or via my Flex app). As an aside, my map service coded domains are working correctly via REST. Thanks, -Erik
... View more
07-31-2012
12:44 PM
|
0
|
0
|
394
|
POST
|
I am definately interested. I sent you a message with more details. Thanks. Frederic, Here's the core of my code. I took out a lot of non-essential stuff, so it might not all look right (e.g. if you look in the Design view of FB, it won't look right). But this should make it easier to see what I did to get the GP results & datagrid working. Also note that I'm using an asynchronous service-- if yours is synchronous, you'll need to amend it accordingly. Hope this helps. -Erik <?xml version="1.0" encoding="utf-8"?>
<viewer:BaseWidget xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:esri="http://www.esri.com/2008/ags"
xmlns:viewer="com.esri.viewer.*"
xmlns:supportClasses="com.esri.ags.skins.supportClasses.*"
xmlns:renderers="com.esri.ags.renderers.*"
widgetConfigLoaded="init()">
<fx:Script>
<![CDATA[
import com.esri.ags.FeatureSet;
import com.esri.ags.Graphic;
import com.esri.ags.Map;
import com.esri.ags.events.ExtentEvent;
import com.esri.ags.events.GeoprocessorEvent;
import com.esri.ags.geometry.Extent;
import com.esri.ags.geometry.Geometry;
import com.esri.ags.geometry.MapPoint;
import com.esri.ags.layers.GraphicsLayer;
import com.esri.ags.renderers.supportClasses.UniqueValueInfo;
import com.esri.ags.symbols.SimpleFillSymbol;
import com.esri.ags.tasks.supportClasses.*;
import com.esri.ags.tasks.supportClasses.JobInfo;
import com.esri.ags.tasks.supportClasses.LinearUnit;
import com.esri.ags.tasks.supportClasses.ParameterValue;
import com.esri.ags.utils.GraphicUtil;
import com.esri.ags.utils.WebMercatorUtil;
import flash.events.Event;
import flash.utils.flash_proxy;
import flashx.textLayout.tlf_internal;
import mx.collections.ArrayCollection;
import mx.collections.IList;
import mx.controls.Alert;
import mx.core.mx_internal;
import mx.events.CloseEvent;
import mx.events.EffectEvent;
import mx.events.FlexEvent;
import mx.events.ListEvent;
import mx.rpc.Fault;
import mx.rpc.events.FaultEvent;
import mx.utils.ArrayUtil;
import mx.utils.ObjectUtil;
import spark.events.GridEvent;
import spark.events.TextOperationEvent;
[Bindable] private var taskurl:String;
private var myGraphicsLayer:GraphicsLayer;
[Bindable] private var resultAttributes: ArrayCollection;
private var selGraphic:Graphic;
private var fs: FeatureSet;
private var highlightedGraphic:Graphic;
private var requestObject:Object;
[Bindable] public var inputArr:Array = new Array();
private var inputFR:FileReference = new FileReference();
public function init():void
{
if (configXML) // checking for valid content in the configuration file
{
myGraphicsLayer = new GraphicsLayer();
taskurl = configXML.taskurl;
}
else
{
Alert.show("Problem with config.xml file")
}
map.doubleClickZoomEnabled= true;
}
//geoprocessor fault handler
private function gp_faultHandler(event:FaultEvent):void
{
Alert.show(event.fault.message.toString() );
}
//parameter input submit button handler
private function submit_clickHandler(event:MouseEvent):void
{ myGraphicsLayer.clear();
var requestObject:Object = createRequestObject();
gp.submitJob(requestObject);
// CursorManager.setBusyCursor();
setCurrentState("Processing",true);
}
//creates the request object from the input parameter values
private function createRequestObject():Object
{
var metric1:String = met1.text;
var metric2:String = met2.selectedItem;
var metric3:String = met3.text;
requestObject ={
"Metric_1":metric1,
"Metric_2":metric2,
"Metric_3":metric3};
return requestObject;
}
//fires when geoprocessor finishes. retrives result data
protected function gp_jobCompleteHandler(event:GeoprocessorEvent):void
{
if (event.jobInfo.jobStatus == JobInfo.STATUS_SUCCEEDED)
{
gp.addEventListener(GeoprocessorEvent.GET_RESULT_DATA_COMPLETE, onGetResult);
gp.getResultData(gp.submitJobLastResult.jobId, "Result");
}
else
{
Alert.show("Geoprocessing Error");
}
}
//fires when the results have been received. renders the results & grahics to map, gets attributes
protected function onGetResult(event : GeoprocessorEvent) : void
{
myGraphicsLayer.renderer = ResultRenderer(); //this is a separate unique value renderer compenent
var pv:ParameterValue = event.parameterValue;
fs = new FeatureSet;
fs = pv.value as FeatureSet;
for each(var graphic:Graphic in fs.features)
{
myGraphicsLayer.add(graphic);
}
map.addLayer(myGraphicsLayer);
var resultAttribute:Array = fs.attributes;
resultAttributes= new ArrayCollection(resultAttribute);
}
//selects result graphic when clicked on and finds matching record in datagrid
protected function graphic_clickHandler(event:MouseEvent):void
{
selGraphic = Graphic(event.target);
for each(var attributes : Object in resultsGrid.dataProvider)
{
if (attributes === selGraphic.attributes)
{
resultsGrid.selectedIndex = (resultsGrid.dataProvider as ArrayCollection).getItemIndex(attributes)
}
}
resultsGrid.ensureCellIsVisible(resultsGrid.selectedIndex);
resultsGrid.setSelectedIndex(resultsGrid.selectedIndex);
}
//helper function to find the graphic from the selected datagrid row
protected function findGraphicByAttribute(attributes : Object) : Graphic
{
for each( var foundGraphic : Graphic in myGraphicsLayer.graphicProvider)
{
if ( foundGraphic.attributes.OBJECTID === attributes.OBJECTID)
{
return foundGraphic;
}
}
return null;
}
//zoom to the selected point when datagrid row is double clicked
protected function resultsGrid_gridDoubleClickHandler(event:GridEvent):void
{
var pt:MapPoint = null;
pt = highlightedGraphic.geometry as MapPoint;
if (map.scale > 80000)
map.scale = 50000;
map.centerAt(pt);
}
]]>
</fx:Script>
<fx:Declarations>
<esri:Geoprocessor id="gp"
jobComplete="gp_jobCompleteHandler(event)"
fault="gp_faultHandler(event)"
processSpatialReference="{map.spatialReference}"
outSpatialReference="{map.spatialReference}"
showBusyCursor="false"
url="{taskurl}"
useAMF="false"
updateDelay="2000"
/>
</fx:Declarations>
<viewer:WidgetTemplate id="myWidget"
width="450" height="600"
>
<s:Group id="widgetGrp"
width="100%" height="100%">
<s:Group id="paramsArea">
<s:TextInput id="met1"
x="68" y="48"
width="210" height="20"/>
<s:ComboBox id="met2" x="120" y="75" selectedItem="{}">
<s:ArrayCollection>
<fx:String></fx:String>
<fx:String>AND</fx:String>
<fx:String>AND NOT</fx:String>
<fx:String>OR</fx:String>
</s:ArrayCollection>
</s:ComboBox>
<s:TextInput id="met3"
x="68" y="105"
width="210" height="20"/>
<s:Button id="submit"
x="300" y="720"
label="Submit"
click="submit_clickHandler(event)"/>
</s:Group>
<s:Group id="resultsArea">
<s:DataGrid id="resultsGrid"
width="100%" height="98%"
dataProvider="{resultAttributes}"
mouseFocusEnabled="true"
verticalScrollPolicy="auto"
doubleClickEnabled="true"
gridDoubleClick="resultsGrid_gridDoubleClickHandler(event)"
bottom="24">
<s:columns>
<s:ArrayList>
<s:GridColumn dataField="Field1" width="250"/>
<s:GridColumn dataField="Field2" width="65"/>
<s:GridColumn dataField="Field3" width="100"/>
</s:ArrayList>
</s:columns>
</s:DataGrid>
</s:Group>
</s:Group>
</viewer:WidgetTemplate>
</viewer:BaseWidget>
... View more
05-16-2012
10:23 AM
|
0
|
0
|
190
|
POST
|
I'm interested. How can I learn more? Hi Frederic, I have pursued this and developed a custom widget that includes geoprocessing results as graphics linked to a datagrid. Modifying the Viewer's Geoprocessing widget ended up not making sense for me-- since I was taking the time to learn Flex and develop custom functionality, it made more sense to incorporate other project-specific custom functionality (beyond the datagrid linked to graphic results) into a custom widget. The Viewer's Geoprocessing widget is also pretty complex since it is designed to handle many kinds of geoprocessing operations, not just a specific one like my custom widget is, so modifying it would require more time spent trying to understand and modify a lot of code that isn't applicable to my project, anyway. If you are interested in getting into the Flex coding, I would be happy to share some of my code (there are also already several posts and examples out there which helped me along the way. This blog is a good place to start... http://blogs.esri.com/esri/arcgis/2009/02/19/sychronizing-map-and-datagrid-interaction-with-the-arcgis-api-for-flex/ ) If I ever have the time to dig in a bit more, I still think it would be great to have this as part of the stock Geoprocessing widget functionality and would repost the results here if I do go down that road. I suspect there are others with more Flex skills who will beat me to it, though! -Erik
... View more
05-15-2012
05:12 AM
|
0
|
0
|
190
|
Title | Kudos | Posted |
---|---|---|
1 | 12-20-2021 01:55 PM | |
1 | 10-28-2013 10:07 AM |
Online Status |
Offline
|
Date Last Visited |
10-31-2023
09:42 AM
|