Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am wanting to post data back to a feature service using the addFeatures method on a feature service. Here it says to use a query and an esri rep says to use a query task. But my "Query" object doesn't seem to have a "features" definition as suggested in the linked doc page above where they say the parameters table. Anyone have any ideas on how to do the addFeatures.

QueryTask queryTask =
                new QueryTask("http://server/ArcGIS/rest/services/geoprocessing/featureServiceName/FeatureServer/0/addFeatures");

            ESRI.ArcGIS.Client.Tasks.Query query = new ESRI.ArcGIS.Client.Tasks.Query();
            query.???
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

The addFeatures method is part of the ArcGIS Server REST API, and while the ArcGIS Silverlight API uses the REST API to interface with ArcGIS Server, the two APIs don't correspond directly.

If you are using the Silverlight API, adding features is an edit task. Here is a good overview of editing with the Silverlight API. and there are a few different approaches listed in the samples.

Alternatively, you could write your own code that generated the REST API calls you wanted, might be a better option depending on your application.

share|improve this answer
    
This was just clearing in my head and reading your answer cemented it. Thanks. –  Justin Apr 2 '12 at 10:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.