private void initialize() {
try {
// WorkspaceConnectionInfo conInfo = new WorkspaceConnectionInfo("../../SampleData/OlympicGreenSCV/OlympicGreen.sxwu");
WorkspaceConnectionInfo conInfo = new WorkspaceConnectionInfo("E:\\test\\cloud_zb_1.smwu");
conInfo.setType(WorkspaceType.SXWU);
m_workspace.open(conInfo);
m_sceneControl.getScene().setWorkspace(m_workspace);
// m_sceneControl.getScene().open("OlympicGreen");
m_sceneControl.getScene().open("cloud_zb");
m_sceneControl.getScene().setCrossVisible(false);
// Layer3D olympicGreenLayer = m_sceneControl.getScene().getLayers().get("Ground@OlympicGreen");
Layer3D olympicGreenLayer = m_sceneControl.getScene().getLayers().get("cloud_zb");
m_sceneControl.getScene().ensureVisible(olympicGreenLayer.getBounds(), 1000);
for(int i= 0;i<m_sceneControl.getScene().getLayers().getCount();i++)
{
Layer3D layer = m_sceneControl.getScene().getLayers().get(i);
layer.setSelectable(false);
}
m_point3Ds = new Point3Ds();
m_point3DsAll = new Point3Ds();
m_geoLine3D = new GeoLine3D();
m_geoLine3D.setStyle3D(setLineGeoStyle3D());
m_pointName = "Point";
} catch (Exception ex) {
System.out.println(ex.getMessage());
}
}
注释掉的是原代码,下一行就是加载自己的缓存文件,但是会报错:name 指定名称的三维地图场景不存在。
但是idesktop能打开文件,场景名是正确的