JavaScript SDK版本3.6.328
2025-10-29
// 构造卷帘配置项
let config = new Glodon.Bimface.Earth.Plugins.ViewComparator.SwipeConfig();
config.viewer = viewer;
// 设置两视口内的图层对象
config.layerContents = [["layer_100000001234","layer_map_1"],["layer_map_1"]];
// 上下视口排列
config.direction = "Vertical";
// 构造卷帘对象
let swipe = new Glodon.Bimface.Earth.Plugins.ViewComparator.Swipe(config);
// 设置视口为左右排列方式
swipe.setDirection("Horizontal");// 构造锚点配置项
let config = new Glodon.Bimface.Earth.Plugins.Animation.AnchorConfig();
config.viewer= viewer;
config.size = 5;
// 设置锚点大小
config.location= {lat: 39.90917336505072, lon: 116.39641133371573, alt: 12};
// 构造锚点对象
let anchor = new Glodon.Bimface.Earth.Plugins.Animation.Anchor(config);
// 设置锚点颜色
anchor.setColor({color:new Glodon.Web.Graphics.Color(150,100,0,0.8),wireframeColor:new Glodon.Web.Graphics.Color(0,250,100,0.9)});
anchor.update();

BIMFACE智能客服
7*24提供专业的BIMFACE使用支持与帮助