var background = new esri.layers.ArcGISDynamicMapServiceLayer(mapservice1, { "id": "mainbasemaps" }); // map.addLayer(background); background.setDPI(150); var altmaps = new esri.layers.ArcGISDynamicMapServiceLayer(altbasemaps, { "id": "altbasemaps" }); // map.addLayer(altmaps); var aerials = new esri.layers.ArcGISDynamicMapServiceLayer(aerialservice, { "id": "aerialmaps" }); //map.addLayer(aerials); dynamicMapServiceLayer = new esri.layers.ArcGISDynamicMapServiceLayer(mapservice2, { "id": "mainmap" }); dynamicMapServiceLayer.setOpacity(0.9); dynamicMapServiceLayer.setDPI(96) map.addLayers([background],[altmaps],[aerials],[dynamicMapServiceLayer]);
Reference to a feature or graphics layer that will be a target snapping layer. The default option is to set all feature and graphics layers in the map to be target snapping layers.
var snappinglayer = new esri.layers.FeatureLayer(mapservice2 + "/4", { mode: esri.layers.FeatureLayer.MODE_ONDEMAND, outFields: ["*"] }); ... var layerInfos = [{ layer: snappinglayer }]; snapManager.setLayerInfos(layerInfos);
Solved! Go to Solution.
Ah, do I understand correctly then, that the snapping only works on feature layers added to the map? I guess so
If so it would explain a lot as I have no feature layers, just dynamic ones.
So, if I add a feature layer to the map - does it have to be visible?
Cheers
ACM
Reference to a feature or graphics layer that will be a target snapping layer. The default option is to set all feature and graphics layers in the map to be target snapping layers.
Ah, do I understand correctly then, that the snapping only works on feature layers added to the map? I guess so
If so it would explain a lot as I have no feature layers, just dynamic ones.
So, if I add a feature layer to the map - does it have to be visible?
Cheers
ACM