1

I want to add more than one layer to snapping in map

var layerInfos = [
 {layer:results[0].layer}
];
snappingManager.setLayerInfos(layerInfos);
PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Dec 5, 2015 at 8:33
2
  • Welcome to GIS SE! As a new user be sure to take the Tour to learn how this site works. What GIS software are you using here? Commented Dec 5, 2015 at 9:00
  • thanks for your advice i am building a gis application using arcgis javascript api Commented Dec 5, 2015 at 9:22

1 Answer 1

1
var snapToTheseLayers = [
 {layer: layer1},
 {layer: layer2}, ...//add as many layers as you want
];
snappingManager.setLayerInfos(snapToTheseLayers );
answered Jan 26, 2016 at 13:39
2
  • Please edit provide context for your answer. Commented Jan 26, 2016 at 14:16
  • not sure what context is needed, took what max4ever suggested and applied it to ESRI's 'Measurement Widget' example here and it worked great, Commented Jun 9, 2016 at 11:48

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.