Geometry editing for drawing and measurement in the upcoming 5.14 Web release
In the upcoming Web 5.14 release some of the geometry editing infrastructure has been completed. There is still work to be done around vertex add/edit/delete and geometry editing toolbar to tie it together.
There is however enough there today that you might want to try it out, or even use it today.
Here’s how to add an ‘Edit Markup’ tool to the toolbar in Web:
1. Add a ‘Custom Command’ to the toolbar.
2. Edit the command and paste in the following JSON:
[
{
"name": "sketching.capture-geometry",
"arguments": {
"geometryType": "extent"
}
},
"map.get-markup",
{
"name": "sketching.edit-geometry",
"arguments": {
"options": {
"enableDelete": true
}
}
}
]Use the area selection tool to select one (or more!) drawings or measurements.
Once in edit-geometry mode you can combine mouse work with the following keyboard options.
- Holding CTRL allows asymmetrical scaling of the shape(s)
- Holding SHIFT allows more precise control of actions (finer control)
- Hitting ESC cancels the edit and returns the shape(s) to the pre-edit state
- Hitting Delete (DEL) deletes the selected shape(s)
To save the edits, click somewhere on the map outside your edit frame (you may have to click twice).
How does this work?
"sketching.capture-geometry":
- This operation allows the user to draw a geometry. This geometry can then be used to select markup in the next step.
- Using an “extent” as the geometryType will allow the selection and editing of multiple pieces of markup at the same time.
"map.get-markup":
- This operation queries the map for any markup that intersects the given geometry.
- The results will be returned in the ‘graphics’ output parameter of this operation.
"sketching.edit-geometry":
- This operation launches the editing widget with any geometries found in the inputs.
- You can supply “geometries”, “graphics”, or “features” to this operation and the geometries will be extracted from each parameter for editing.
- Here we are using the “graphics” input only, but if the previous operation had as an output any one of these three things, we would still be able to place this operation after it.
That’s it! There’s no step required afterwards to re-add the graphics to the map or reconcile the edits, as graphics from GraphicsLayers (like the markup layer) can be edited ‘in-place’. When you are done, the operation updates the geometry properties of the supplied graphics, and the markup layer will automatically reflect the changes.
Why this spoiler article a couple of weeks before the release? This post will be referenced in the What's New Release Notes.
Cam (with a shout out to Jonathan who provided a lot of the content)
-
Tried and tested successfully. Thanks.
Couple of quick questions. You mention that this was a spoiler article prior to release. Do we have a date for when this will be available in GCW? And will the release also include vertex add/edit/delete and geometry editing toolbar?
Thanks.
0 -
Hi Peter - The out of the box tool and the geometry toolbar associated with it should be there in the next 5.15 release. We are working on the vertex add/edit/delete ... not clear if I can get that over the line for 5.15 may be the following release.
0 -
And I was hoping for cogo style editing with direction and distance...
0 -
@Cattyann Campbell? Indeed, much of the work we have been doing is to enable 'programatic' interaction with an in-progress geometry capture. We are planning to add a new worklfow template you can generate that will give you a COGO style editing interface. I chose a workflow template over an out-of-the-box tool because in one afternoon of research I discovered at least six different approaches to GOGO style editing (apparently one size does not fit all) and so give you something you can use as-is or modify to meet your needs in the form of a workflow template seemed the best approach.
0 -
Ah makes sense when will this workflow be available? Cattyann Campbell Tompkins County ITS/GIS “Knowing where things are, and why, is essential to rational decision making” ~ Jack Dangermond, ESRI 0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
5 Kommentare