发现了另一个问题 切片成功加载后 但是三维模型不加载了 他们不能共存吗?
这是我的代码
//加载二维切片 fun openLocalTile(scenePath: String){ sceneControl.sceneControlInitedComplete { sceneControl.scene.layers.addLayerWith(scenePath, IMAGEFILE, true,"底图") } } //加载三维模型 fun openLocalScene(scenePath: String) { sceneControl.sceneControlInitedComplete { val workspace = Workspace() val info = WorkspaceConnectionInfo() info.server = scenePath info.type = WorkspaceType.SMWU; workspace.open(info) //场景显示控件与工作空间相关联 val scene = sceneControl.scene scene.workspace = workspace //打开场景 val sceneName = workspace.scenes[0] scene.open(sceneName) } }
感谢大佬