How do I enable snapping to ArcGISDynamicMapServiceLayer in WAB.
I try
var snapManager = this.map.enableSnapping();
var layerDyn = this.map.getLayer(this.map.layerIds[1]);
var layerInfos = [ {layer: layerDyn} ];
snapManager.setLayerInfos(layerInfos);
but snapping not working.
Please help me
Thanks a lot
Ondrej,
Snapping requires a FeatureLayer as snapping needs the geometry to exist on the client machine. A ArcGISDynamicMapServiceLayer is just an image downloaded from the server to the client so the client machine does not have the actual geometry to work with when snapping. Hope this clears this up for you.