<?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.*" > <fx:Script> <![CDATA[ private function AddXY():void { var myMapPoint:MapPoint = new MapPoint(Number(longText.text),Number(latText.text),map.spatialReference) var myFeatureSet:FeatureSet = new FeatureSet([{geometry:myMapPoint}]); myFeatureSet.geometryType = "esriGeometryPoint"; var params:Object = { "Point_Input": myFeatureSet, //this assumes your gp service is expecting an input called Point_Input }; gp.execute(params); } ]]> </fx:Script> <fx:Declarations> <esri:Geoprocessor id="gp" url="your gp URL" useAMF="false" executeComplete="some event " outSpatialReference="{map.spatialReference}" fault="some event " /> </fx:Declarations> <viewer:WidgetTemplate id="wTemplate"> <s:HGroup width="100%" horizontalAlign="left" verticalAlign="middle"> <s:Label width="60" id="latLabel" text="Latitude:" /> <s:TextInput width="100" maxChars="9" id="latText" restrict="0-9\." /> <s:Label width="60" id="longLabel" text="Longitude:" /> <s:TextInput width="100" maxChars="9" id="longText" restrict="0-9\." /> <s:Button width="100" label="Add XY" click="AddXY()" /> </s:HGroup> </viewer:WidgetTemplate> </viewer:BaseWidget>
...in the documentation it lists "recordset" as a valid input parameter type in the tag documentation, but in the geoprocessing widget documentation it states: ... "RecordSet types are not supported as input parameters."
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.