Change Feature Symbology for Feature Service
I have a feature service that uses a unique value legend to symbolize each feature based on it's status, and I want to be able to have a user edit the status and other attributes. Can anyone provide me with some hints where I can start to develop a workflow that will accomplish this?
-
Hi Patrick,
I can provide you with some hints! In this simple example we will hookup a feature description workflow, start the workflow with an ID, change status of object and then update back to ArcGIS.
I've always implemented feature editing through launching workflows which have been setup in the feature layers 'feature description' property. We can launch a workflow from a maptip or from the results list this way, and Essentials handles passing in the object's ID (or whatever unique attribute we want) to the workflow we specify. An example syntax for this is: <a href="command:RunWorkflowWithArguments?workflowId=EditLocation&businessId={BUSSID}">Edit</a>
Now we can begin working on an editing workflow.
For a start, make a query task which gets a single object by it's ID which we passed in as a workflow argument. This gets us the feature we want to change. We will be interested in queryFeatureSet.Features.First()
Do an assign task here to a new graphic you can call editObject. eg: editObject = queryFeatureSet.Features.First()
This graphic object has geometry and a dictionary of attributes which correspond to the field data. It is in this dictionary where you can modify the status field to be whatever you want (It's probably a coded domain, so not quite whatever you want). In an assign task: editObject.Attributes("STATUS") = "Open"
Now comes the part where we save it back using the UpdateFeatures task. For the features argument you can simple put queryFeatureSet.Features
Last step is to refresh the map, and voila, changed symbol.
Good luck and keep us posted if you have other questions related to this.
-Kevin
0 -
The video http://support.geocortex.com/citizens-service-request-demonstration and the related download package provide me with a good start for editing and updating a feature service.
James
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare