Problem using alwaysSnap from SnappingManager on custom widget

345
0
02-27-2019 03:56 AM
RafaelTietz_Strellow1
New Contributor

Hi, 

I'm having trouble using the SnappingManager of the map.

I have a custom widget in which the user create features in 2 layers of the map. What I need is when creating a polyline feature, it starts connected to other pre-existing feature of the same layer, so I'm trying to enable the snapping tool to work all time. 

According to the API reference, doing this code would work, and the snapping tool would be working all time.

var _snapManager = this.map.enableSnapping({ 
"alwaysSnap": true
});

Technically the snapping tool is enabled, but when I click in the map to create que first point of the polyline, the snap doesn't happen:

Am I missing some step of this implementation?

Thaks for the help.

0 Kudos
0 Replies