FeatureCollection from Geoprocessing Service

488
0
07-17-2012 11:53 AM
KeithSandell
New Contributor III
Has anybody written any Python code to create a JSON representation of a featureclass, specifically a featureCollection that can be consumed in a Javascript API app as a FeatureLayer?

Similar, or rather the same, to what is returned from the Javacript API sample "Add Shapefile": http://help.arcgis.com/EN/webapi/javascript/arcgis/help/jssamples/portal_addshapefile.html

Or is there an arcpy function that can do this?

Just want to check before I run and recreate the wheel.

The GPFeatureRecordSetLayer that is returned by a geoprocessing service is too light weight, i.e. lacks many of the JSON object name/value pairs of shapefile attribute information.

Thanks
0 Kudos
0 Replies