[New sample] Snap geometry edits with utility network rules#1566
[New sample] Snap geometry edits with utility network rules#1566
Conversation
williambohrmann3
left a comment
There was a problem hiding this comment.
Sample works great! Overall, minor feedback. Regarding unrelated changes to other metadata json files, if you can undo those on this branch, PR #1565 addresses cases where we have multiple redirect links.
|
|
||
| Snap sources can be enabled and disabled. Snapping will not occur when `SnapRuleBehavior.RulesPreventSnapping` even when the source is enabled. | ||
|
|
||
| To interactively snap a vertex to a feature or graphic, ensure that snapping is enabled for the relevant snap source, then move the mouse pointer or drag a vertex to nearby an existing feature or graphic. If the existing feature or graphic has valid utility network connectivity rules for the asset type that is being created or edited, the edit position will be adjusted to coincide with (or snap to) edges and vertices of its geometry. Tap or release the touch pointer to place the vertex at the snapped location. |
There was a problem hiding this comment.
then move the mouse pointer or drag a vertex to nearby an existing feature or graphic
I'd rephrase this to
"then move the mouse pointer or drag a vertex close to an existing feature or graphic"
| WidthRequest="10" /> | ||
| <Label Text="RulesPreventSnapping" /> | ||
| </StackLayout> | ||
| <Button Clicked="SnapSourcesButton_Clicked" Text="Close" /> |
There was a problem hiding this comment.
Your choice, but I think this button could be removed. A tap gesture recognizer when tapping a semitransparent border would work since you're following the popup UI pattern, alike the TakeScreenshot MAUI sample.
There was a problem hiding this comment.
I thought about using a tap gesture recognizer here as well, I tried with and without and I think I prefer the button in this case. Mostly because we don't need a scroll view here so it's easy to see the snap sources and the close button all together.
If you're happy I'll leave it in.
There was a problem hiding this comment.
Changed my mind and removed it 👍
There was a problem hiding this comment.
My apologies, the TakeScreenshot sample wasn't a great example since tapping anywhere on screen closes the screenshot "popup". Tapping anywhere in the popup, say the snap source checkbox shouldn't close the popup automatically. But tapping the greyed out GeoView should close out the popup. DisplayGrid is a better sample of what I meant by the popup UI pattern.
The problem was the grid with the greyed out the semitransparent background was the parent of the popup, so tapping the popup was also tapping the grid due to inheritance. I went ahead and separated the popup background from the actual popup (indention is why the diff is large, did not make any other edits).
commit: 6fbb6b1
allows us to edit the snap sources without automatically closing the popup; tapping the greyed out geoview ("popup background") is required to close popup
williambohrmann3
left a comment
There was a problem hiding this comment.
Nice addition to our samples offering :)
Co-authored-by: Prathamesh Narkhede <55591622+prathameshnarkhede@users.noreply.github.com> Co-authored-by: William Bohrmann <wbohrmann@esri.com>


Description
Added new sample to demonstrate how to use the
GeometryEditorto edit geometries using utility network connectivity rules.Type of change
Platforms tested on
Checklist