using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using SuperMap.Data;
using SuperMap.Realspace;
using SuperMap.UI;
namespace Import_3D_CBD_Mode_To_Realspace
{
public partial class Form1 : Form
{
Workspace workspace;
FlyManager flyManager;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
flyManager.Play();
}
private void button2_Click(object sender, EventArgs e)
{
flyManager.Pause();
}
private void bindingSource1_CurrentChanged(object sender, EventArgs e)
{
}
private void panel1_Paint(object sender, PaintEventArgs e)
{
workspace = new Workspace();
// SceneControl sceneControl1 = new SceneControl();
WorkspaceConnectionInfo CBD1 = new WorkspaceConnectionInfo(@"F:\B16_GIS_1Class\CBD_And_Satellite\CBD.smwu");//打开工作空间
workspace.Open(CBD1);//该句出现问题
SceneControl sceneControl1 = new SceneControl();
sceneControl1.Scene.Workspace = workspace;
sceneControl1.Scene.Open("CBD");//打开场景
Camera camera = new Camera();//视角设定
camera.Longitude = 116.28;
camera.Latitude = 39.54;
camera.Altitude = 10;
camera.Heading = 30;//??
camera.Tilt = 80;//??
sceneControl1.Scene.Fly(camera, 1);
sceneControl1.Scene.FlyManager.Routes.FromFile(@"F:\B16_GIS_1Class\CBD_And_Satellite\route\route\CBDroute.fpf");//飞行路线设定
flyManager = sceneControl1.Scene.FlyManager;
}
}
}