How can I accomplish snapping-functionality?

2601
2
11-22-2012 09:58 PM
New Contributor
Hi,

How can I accomplish snapping-functionality for the EditorWidget resp. Editor-Class?
Is it possible to use snapping without editing eg. retrieving coordinates of snapped featurevertices shown by the user?

Thanx
Reply
0 Kudos
2 Replies
New Contributor
Here are some infos, which I found out for myself.

Snapping-functionality has at least two preconditions:
1) The GraphicsLayer resp. FeatureLayer which should be snapped to must have the property IsHitTestVisible="True".
2) You have to know the key, which activates the snapmode. The Default is Left-Ctrl. Use Editor.SetSnapKey to change this.

Snapping is also possible without editing a FeatureLayer, eg. drawing geometries on a draw-object while snapping on GraphicsLayer and FeatuerLayer.
Reply
0 Kudos
New Contributor
Hi

I am testing Runtime for WPF and referring to the snapping, I have seen that it work only to vertices and there is not nearest snapping. The snapping (holding left control) do not work at the first click, working after second click only. It is not good, because I can need to start a polyline from another for example. I also have seen that the snapping do not work to point features.

Do you or someone have tested and seen this? There is some solution for this?

Thanks

Cristian
Reply
0 Kudos