arcgis js之卷簾工具


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#

 

 

 

 

鑽研不易,轉載請注明出處。。。。。。

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM