Snapping with measurement tool on all layers/single layer not working.
this.featureLayer = new FeatureLayer(this.Khasraurl,
{
mode: FeatureLayer.MODE_ONDEMAND,
// infoTemplate: infoTemplate,
outFields: ["*"]
});
var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new dojo.Color([255, 0, 0]), 2), new dojo.Color([0, 0, 255, 0.20]));
this.featureLayer.setRenderer(new SimpleRenderer(symbol));
this.map.addLayer(this.featureLayer);
var layerInfos = [{
layer: this.featureLayer
}];
// alert(featureLayer);
//alert(JSON.stringify(featureLayer));
//dojo.keys.copyKey maps to CTRL on windows and Cmd on Mac., but has wrong code for Chrome on Mac
var snapManager = this.map.enableSnapping({
alwaysSnap: false,
snapKey: 'CTRL', // key string ==> keys['CTRL']
tolerance: 15
});
snapManager.setLayerInfos(layerInfos);