btfou

improve enableSnapping() method

Discussion created by btfou on Jan 2, 2014
I posted an idea here, which suggests enableSnapping() check for an existing instance of snapping manager and use its options when recreating the snapping manager.

enableSnapping() with custom options works great when called after all layers are added; however in a scenario where the user will load feature layers and add graphic layers all the options are lost when calling enableSnapping() to include the newly added layer, unless the options are created and passed again.  Because the layers are being added by custom classes/widgets, the move away from globals, and the nature of AMD, I found myself passing an object of the options all over the place.  I've since added my own method to my extended map class which does just this, but having enableSnapping() check for and reuse the options seems like something the api should do.

Outcomes