Plot coordinates and edit data
I am new to Geocortex Essentials and Workflow. I think what I am trying to accomplish is fairly simple but I am having trouble knowing where to get started.
What I would like to do is:
1) Have users enter a pair of lat/lon coordinates
2) Plot the coordinates on a map and move the extent to the newly added coordinates
3) Have the user verify the coordinates as being in the right place
4) If verified, pass the coordinates into an SDE table and expose the rest of SDE attributes to the user for editing
Any information, advice or samples that could help me get started would be greatly appreciated.
Cheers,
Ben
-
The Silverlight Viewer already has the ability in the Analysis tab for the user to enter coordinates. This will allow the user to zoom in to that location.
Is the layer you are editing a point layer? Does it already have the lat-longs? It might be easier to just have the user do a search for the lat-long. You might set a form search with auto-complete input for Lat, and have it return Lat and Long, then the user selects the correct one.
If the layer you are editing is not a point layer, and you are just trying to locate a polygon (or line) by entering in Lat-Long, then I would have the user just use the built in funtionality that I mentioned above. Once they have come to the correct location, then they can select the feature to edit. in either case, you will need AGS 10 and SL 1.2 for this to work well. I haven't played with it yet, but in 1.2, there is a new Edit task that has been added.
0 -
Mostly this is possible right now, even with the first release of our editing tools. To give you a general idea of the workflow, you could:
1. Make a variable of the type ESRI.ArcGIS.Client.Geometry.MapPoint
2. Use a form to collect the lat/long and assign them to MapPoint.X and MapPoint.Y
3. Use the ESRI Buffer Task to buffer an extent surrounding this point and then use Set Map Extent to zoom to the buffered extent.
4. Use a form to ask the user for verification.
5. Finally, use Run External Command to run the command StartAttributeEditingCommand. This will require the user to click on the feature to edit, as unfortunately there is no editing command right now that lets you pass a feature. The attribute editing also needs to be set up beforehand in the same way as would be needed to use the editing toolbar directly.
What you can't do right now is pass the lat/long directly to the attribute editing form, or automatically pass a feature to be edited. If these are crucial to your business needs then please make a request in our feature request forum. The editing tasks are at an early stage of development, and we are certainly listening to all feedback that we receive.
Also, if you need assistance developing this or any other workflow, please open a support case and we would be happy to help you develop one.
0 -
Jonathan,
Thank for the reply. Conceptually I understand the process you posted, I even was able to mock up the process in Workflow designer. What I am having trouble getting started with is knowing how and where to supply parameters to variables. For example I have created a design form to accept a latitude and longitude coordinate supplied by the user (as string variables) and an ESRI Map Point variable. What I don't understand is how a set the user supplied variables from the form as the X and Y parameters of the map point (or how I would convert the input string to double). I know this is pretty basic but this is the level I am starting at.
To follow up on why it would be helpful to pass XY coordinates to a table (or a geometry built on the XY to a feature class), this application is for survey monuments, while the users will usually supply survey grid coordinates as part of the table of the feature, we would also like them to plot latlon coordinates representing survey monuments at a higher accuracy than what would be possible through heads up digitizing. If they could heads up digitize I think pretty much all of the functionality I would need is already there in the Geocortex viewer with the new editing tools. With that in mind is there any way for a user to snap a feature to a graphic XY point they have added? That would probably do the trick as well.
Thanks again, will look into the feature request and support case.
Cheers,
Ben
0 -
I was able to make some progress once I figured out what the "Assign" tool did. I made it all the way to Buffer Task. At this point I am having trouble with assigning a variable to the results of the Buffer Task. Nothing I seem to try works (ESRI.ArcGIS.Client.Graphics.DictionaryChangedEventArgs or IEnumerable<Data Item>). At tthis point I am not sure how to proceed. Any advice would be much appreciated.
Cheers,
Ben
0 -
The results of the buffer task go in a variable of type IEnumerable<ESRI.ArcGIS.Client.Graphic>. This is true even if you are only expecting a single result. The single result can then be accessed by myGraphicVariable.first(), or you can access multiple results through a foreach loop.
If you mouse over the text box then it will tell you what type of variable is expected.
0 -
Alright, ignore the code in my last post. I have moved on. At the moment everything seems to be working up until the point where I try and set my map extent. In the previous step I am using a ForEach loop to assign the myGraphic.Geometery.Extent to an empty ArcGIS.Client.Geometry.Envelope. I then pass the envelope to the SetMapExtent activity at which point the simulator throws the follow error.
Activity Executing (SetMapExtent)
Workflow Idle
Workflow Unloaded
<Event Timestamp="2011-07-08T15:53:17.7628711-06:00" Level="ERROR"><Message>Unable to serialize object: The calling thread cannot access this object because a different thread owns it.</Message></Event>Workflow Aborted
An extent is being generated correctly and passed into the tool, this I can see in the simulator. I tried transferring the empty envelope into a different envelope outside of the for loop but to no avail. Have any of you encountered this error previously.
Cheers,
Ben
0 -
Unfortunately it has recently come to light that accessing the results variable of a Buffer Task can crash workflow. If the access occurs at the end of your workflow then the task ?will still complete even though it throws an error in the simulator. However, no subsequent tasks will complete.
In some cases you can get around this problem by placing tasks in parallel (look for the 'Parallel' item in 'Control Flow'). Only the execution path where the buffer task result is accessed will terminate, the others will still continue.
We are currently investigating the cause of this error.
0 -
Jonathan,
I placed the tasks I would like to continue in a sequence in parallel with the two task that are crashing my workflow, but it seems to be producing the same result (e.g. the workflow crashes). Would be possible to avoid crashing the system using geocortex geometries and buffer tasks rather than ESRI client geometeries and ArcServer buffer tasks?
Finally, would it be helpful for me to submit a bug report? This particular set of steps if fairly crucial to the success of my workflow, I would be happy to do anything I can to help speed a resolution of te problem.
Thanks,
Benjamin Zank
0 -
Yes, you can try using the Geocortex Buffer Geometry task, it should not have this issue.
A bug report has been filed and we are working on the problem.
0 -
That's a slightly new sequence of events, but unfortunately you got the same result. I've attached your report to the bug report -- thank you for that -- and there are people looking at the problem. Not sure how to get around it now, although if you don't need to do anything else with that variable other than set the extent, you could put it in one side of a Parallel construction, and hopefully continue the workflow on the other side.
0 -
I have developed a workaround that involves projecting the user input point to Web Mercator converting it to a Geocortex geometry, buffering it using the "Buffer Geometry" converting the output geometry to an ESRI geometry and setting the map extent to the extent of the geometry. For whatever reason, this process does not raise the error I was encountering previously. I have added some forms and logic to have the user confirm the location of their input coordinate, if the user confirms the mapped point location I need to have them start editing a point feature layer I have added to the site and set up for editing. I can apparently run an external command called StartAttributeEditing in order to do this. Problem is, I cannot find any documentation on this command, so I am not sure what its parameters are. I have searched the web and the Geocortex documentation I do have and have not been able to find anything.
If anyone has more information or documentation for this command I would really like to see it.
Thank you,
Benjamin
0 -
Thanks for posting this. It's very helpful. One change I need to make is have the user coordinate input on one line (lat, long) rather than two separate variables. Does anyone have a suggestion on how to do that?
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
12 Kommentare