WAB 2.6 Edit Widget Snap

849
5
08-10-2018 11:01 AM
RichBell
Occasional Contributor

How do you enable the snap function in order to snap to a editable feature?

Snap works fine when snapping to a graphic element but I need it to snap to a point feature and to an edge line feature.

Rich

5 Replies
RobertScheitlin__GISP
MVP Emeritus

Rich,

  Are the feature you are trying to snap to added to the map as feature layers? If they are just a layer in a map service then they are really just an image in the map and thus they can not be snapped to.

0 Kudos
RichBell
Occasional Contributor

Yes,

They are feature servers and can be edited both in the attribute table and by geometry.

Even if I place a new point and save it I can not then snap to it.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Rich,

   I did some testing and I can see that some feature services will snap and others will not. Sounds like a call to tech support.

0 Kudos
RichardHudson
New Contributor III

For me, I can snap a new line to an existing line or point feature, or a new point feature to an existing line feature. But what I really need is to snap an "existing" line to and "existing" point feature. I can't coax Collector for ArcGIS to make those snaps in the field, and consequently, can't have someone edit all those "disconnects" with a web mapping application in the office.

0 Kudos
JoshVan_Kylen
New Contributor III

The SnappingManager in the JS API states that is supports specifying the target snapping layers.  SnappingManager | API Reference | ArcGIS API for JavaScript 3.41 | ArcGIS Developer

But it appears the widget does not include this option. Edit widget—ArcGIS Web AppBuilder | Documentation

The Edit Widget only lets you adjust the SnappingTolerance in pixels.  Based on my test this appears to snap to a grid of pixels the size of your tolerance setting.    

It appears a custom Edit widget is required.  

0 Kudos