snap to the end of a polyline

711
2
Jump to solution
09-30-2014 03:13 PM
jasonwriter
New Contributor III

Is there a way to snap to the end of a polyline rather than just one of the vertices with snappingManager?

0 Kudos
1 Solution

Accepted Solutions
BjornSvensson
Esri Regular Contributor

No, not the endpoints (unless the lines only have two nodes).

You can set up the snapping manager to either snap to edges or vertices (but not endpoints).

https://developers.arcgis.com/javascript/jsapi/snappingmanager-amd.html

Untested idea: Depending on your app, if you could extract the endpoints and add a point layer, then you could set it up to only snap to this end-point-layer. 

View solution in original post

0 Kudos
2 Replies
BjornSvensson
Esri Regular Contributor

No, not the endpoints (unless the lines only have two nodes).

You can set up the snapping manager to either snap to edges or vertices (but not endpoints).

https://developers.arcgis.com/javascript/jsapi/snappingmanager-amd.html

Untested idea: Depending on your app, if you could extract the endpoints and add a point layer, then you could set it up to only snap to this end-point-layer. 

0 Kudos
jasonwriter
New Contributor III

I suspected that. Thank's Bjorn.

j.

0 Kudos