Select to view content in your preferred language

Clip and ship geoprocessing service to be utilized in silverlight app

508
2
07-26-2010 03:24 AM
TamasHajdu
Emerging Contributor
Hi!

Since we were almost unable to find any example or usable code for us we thought that we might ask here as well. The fact is that we are going to develop a function in our exisiting web-app which would use clipAndship geoprocessing task. The problem is that we did not find any example codes to start with. What we would be interested in is here anybody who has relevant experience in including clipandship function or just wants us to help in that?

What we have tried is to include the clip features example code, but it doesnt seem to work!
We would appreciate any help!
Thanks

Sampath and Tamas
0 Kudos
2 Replies
DominiqueBroux
Esri Frequent Contributor
0 Kudos
AnandUpadhya
Emerging Contributor
The Extract Data and Email Task model that is in ArcGIS Server 10 needs to be modified a bit in order to use with silverlight. Currently the GPMultiValue:GPString data type is not in the API so the Layer to be clipped must be fixed in the model itself. Other parameters can be passed normally.

Here's what I did:
1. Create a graphics layer
2. Create a Draw object for drawing polygons add them to the graphics layer for display
3. Add all the polygons drawn by the user to the parameter of type GPFeatureRecordSetLayer

GraphicsLayer graphicsLayer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;
            Graphic graphic = new Graphic()
            {
                Geometry = args.Geometry,
                Symbol = _activeSymbol
            };
            graphicsLayer.Graphics.Add(graphic);

parameters.Add(new GPFeatureRecordSetLayer("Area_of_Interest", args.Geometry));

4. Then add the rest of the parameter and finally submit the job
0 Kudos