arcgis js之卷簾工具
效果圖:
代碼:
var swipe = new Swipe({ view: view, leadingLayers: [layer1, layer2], trailingLayers: [layer3], direction: "vertical", // swipe widget will move from top to bottom of view position: 50 // position set to middle of the view (50%) }); view.ui.add(swipe);
注意:
1.leadingLayers,trailingLayers中添加的圖層需要提前加入地圖中
2.該工具在4.11版本中還沒有。4.12版本未測試,4.13版本可使用
鏈接:
https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Swipe.html#
鑽研不易,轉載請注明出處。。。。。。