AnsweredAssumed Answered

Not Able to Enable Snapping Management on Top of a Feature Service

Question asked by behClevest on Dec 7, 2017
Latest reply on Dec 8, 2017 by behClevest

Can you please take a look at This Demo and let me know why I am not able to set up and enable Snapping on top of following feature Service? What I need is snapping to all features in mouse hover/over of each?

var map;
require(["esri/map",
  "esri/SnappingManager",
  "esri/layers/FeatureLayer",
  "dojo/keys",
  "dojo/domReady!"
], function(Map, SnappingManager, FeatureLayer, keys) {
  map = new Map("map", {
    basemap: "topo",
    center: [-88.158805, 41.786075],
    zoom: 18
  });

  var propertyLayer = new FeatureLayer("https://sampleserver6.arcgisonline.com/arcgis/rest/services/CommunityAddressing/FeatureServer/0", {
    mode: FeatureLayer.MODE_ONDEMAND,
    outFields: ["*"]
  });
  map.addLayers([propertyLayer]);

  var snapManager = map.enableSnapping({
    snapKey: keys.CTRL
  });
  var layerInfos = [{
    layer: propertyLayer,
    snapToVertex: true
  }];
  snapManager.setLayerInfos(layerInfos);

});

Outcomes