Add Geometry to Feature Service?
Does anyone have a workflow or suggestions on how to have a a user draw a polygon that gets added to a Feature Service? This must be fairly common. We are using Essentials 3.9 and Silverlight 1.5.2
Right now, my workflow is something like: Capture Geometry Activity> Run External Command to show graphic > AddFeatures Activity. Obviously, there is more to it than this. Something needs to happen to Cast or Assign the geometry output to something the feature service can take yes?
Also my AddFeatures variables are set up as: system.collections.generic.IList<ESRI.ArGIS.Client.Graphic> & system.collections.generic.Ilist<ESRI.ArGIS.Client.Tasks.EditResultItem>
Once this gets working, the next step would be for the user to add attributes to the feature added.
thanks,
ryan
-
Ryan,
wrap your laughing gear around this one... it may not be all that elegant a workflow, but hey - it works!! and should give you the right process at least for adding features to the feature layer.
(https://support.geocortex.com/Data/Sites/1/userfiles/2797/addnewgeometry.xaml) /Data/Sites/1/userfiles/2797/addnewgeometry.xaml
I've just finished an edit (Update ) one, so let me know if you would like this one also - with thanks to Ralph Price in NZ :)
regards
Gareth
0 -
Hi Gareth,
Thanks a million! It'd be great if you could post the update one as well...
Hopefully this'll get me what I need to move forward. I don't suppose you figured out a way to Commit the changes or Snap the features to something?
Ryan
0 -
Hi Ryan
the commit just happens and try holding down the Ctrl key to get snapping to occur when the cursor is within a given tolerance.
See http://forums.arcgis.com/threads/32067-Snapping for further details
regards
Ralph
0 -
Ryan,
As Ralph has pointed out - the commit happens as part of the workflow - there is no 'commit' activity as such, it's inherent in the "Add features' Activity.
Here's the edit/update workflow I've put together...
(https://support.geocortex.com/Data/Sites/1/userfiles/2797/editfirename.xaml) /Data/Sites/1/userfiles/2797/editfirename.xaml
hope it helps.
cheers
G
0 -
Thanks for the feedback. I found that the Commit does not automatically happen, and I have to use the Run External Command Activity with the Command Name = "Commit" for the Feature Set to get updated. This option is a good thing.
As for snapping, thanks for the tip on that. I'd like to be able to snap to certain basemap features (a vector basemap we host), if possible. I have not really explored this part yet... but, if anyone can tell me if this is even possible, that would be great. Maybe I have to have another layer in the feature service mxd to snap to?
0 -
Hi Ryan
what version ArcGIS Server is the FeatureService running on ? (and Service Pack)
Thanks
Ralph
0 -
Hi Ralph,
I realize now that the Commit DOES happen automatically... ughh. I need to figure out a way to make sure Commit does NOT happen automatically. Also, we are using 10.0 sp4.
Any thoughts at all on snapping to features in the base map layer?
thanks,
Ryan
0 -
Hi Ryan
what is it that you want to be checked prior to a commit? Geometry or attributes? Or both?
As far as snapping goes have you seen this thread? http://forums.arcgis.com/threads/27004-Polygon-Editing-Capabilities-in-Silverlight-API
By default Ctrl show a snapping tolerance circle.
Not sure if it will make a difference whether it is a Base layer of an Operational layer
Regards
Ralph
0 -
Thanks for the info Ralph. I worked it out in my workflow so the poly and attributes aren't applied until the very last step. So, good to go there.
As for the snapping, it seems to me the CTRL/click snapping method only applies to the layer being edited. No big deal as this is not a requirement for my project.
Ryan
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
9 Kommentare