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