-
大小: 1.38MB文件類型: .rar金幣: 1下載: 0 次發布日期: 2023-10-24
- 語言: 其他
- 標簽: SkyLine??ArcGISEngine??
資源簡介
簡單實現SkyLine+Arcgis Engine 二三維聯動 ,加載圖層聯動,刪除圖層聯動。地圖操作聯動。僅供參考(實際坐標轉換自行解決)
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Linq;
using?System.Text;
using?System.Threading.Tasks;
using?System.Windows.Forms;
using?ESRI.ArcGIS.Carto;
using?ESRI.ArcGIS.Controls;
using?ESRI.ArcGIS.DataSourcesFile;
using?ESRI.ArcGIS.DataSourcesGDB;
using?ESRI.ArcGIS.Display;
using?ESRI.ArcGIS.esriSystem;
using?ESRI.ArcGIS.Geodatabase;
using?ESRI.ArcGIS.Geometry;
using?TerraExplorerX;
using?IGeometry?=?ESRI.ArcGIS.Geometry.IGeometry;
using?IPoint?=?ESRI.ArcGIS.Geometry.IPoint;
using?Path?=?System.IO.Path;
using?Point?=?System.Drawing.Point;
namespace?二三維聯動
{
????public?partial?class?Form1?:?Form
????{
????????private?readonly?SGWorld66?_sgworld;
????????public?Form1()
????????{
????????????InitializeComponent();
????????????Init();
????????????_sgworld?=?new?SGWorld66();
????????}
????????#region?打開項目
????????public?string?SamplesDirectory?{?get?{?return?Path.GetDirectoryName(Application.StartupPath);?}?}
????????private?void?OpenProject()
????????{
????????????string?tMsg?=?String.Empty;
????????????//?1.?設置打開項目參數
????????????//string?tAppRoot?=?Path.GetDirectoryName(Application.ExecutablePath);
????????????//string?tProjectUrl?=?Path.Combine(SamplesDirectory?@“Resources\FlyFiles\simplefly.fly“);
????????????string?tProjectUrl?=?@“C:\Users\Administrator\Desktop\SkyLineDemo\SkyglobeLB.fly“;
????????????bool?bIsAsync?=?false;
????????????string?tUser?=?String.Empty;
????????????string?tPassword?=?String.Empty;
????????????//?2.?實例化地球和項目接口
????????????try
????????????{
????????????????//var?sgworld?=?new?SGWorld66();
????????????????//?3.?注冊地球加載完成事件
????????????????_sgworld.onloadFinished?+=?OnProjectLoadFinished;
????????????????//?4.?在同步模式下打開項目
????????????????_sgworld.Project.Open(tProjectUrl?bIsAsync?tUser?tPassword);
????????????????//MessageBox.Show(“異步打開:?“?+?tProjectUrl);
????????????}
????????????catch?(Exception?ex)
????????????{
????????????????tMsg?=?String.Format(“打開項目異常:?{0}“?ex.Message);
????????????????MessageBox.Show(tMsg);
????????????}
????????}
????????void?OnProjectLoadFinished(bool?success)
????????{
????????????string?tMsg?=?String.Empty;
????????????try
????????????{
????????????????//MessageBox.Show(“接受到項目加載事件“);
????????????}
????????????catch?(Exception?ex)
????????????{
????????????????tMsg?=?String.Format(“項目加載完成異常:?{0}“?ex.Message);
????????????????MessageBox.Show(tMsg);
????????????}
????????}
????????#endregion
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????OpenProject();
????????}
????????private?ilayer?m_layer;?//溝通圖層
????????private?ilayer?Selectedlayer_TOC;?//定義刪除圖層
????????//toccontrol?鼠標點擊事件,分為左鍵點擊和右鍵點擊,左鍵控制圖層的顯示,右鍵控制右鍵菜單
????????private?void?axTOCControl1_onmousedown(object?sender?ITOCControlEvents_onmousedownEvent?e)
????????{
????????????//if?(e.button?==?1)
????????????//{
????????????//????var?Ite
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????699??2016-07-12?17:01??SkyLineDemo\Shape\B_PROVINCE.dbf
?????文件????????145??2016-07-12?17:01??SkyLineDemo\Shape\B_PROVINCE.prj
?????文件?????????64??2016-07-13?11:53??SkyLineDemo\Shape\B_PROVINCE.qix
?????文件????????132??2016-07-12?17:03??SkyLineDemo\Shape\B_PROVINCE.sbn
?????文件????????116??2016-07-12?17:03??SkyLineDemo\Shape\B_PROVINCE.sbx
?????文件?????348624??2016-07-12?17:01??SkyLineDemo\Shape\B_PROVINCE.shp
?????文件???????7076??2016-07-12?17:01??SkyLineDemo\Shape\B_PROVINCE.shp.xm
?????文件????????108??2016-07-12?17:01??SkyLineDemo\Shape\B_PROVINCE.shx
?????文件??????30042??2016-07-12?17:06??SkyLineDemo\Shape\B_RIVERTWO11.dbf
?????文件????????145??2016-07-11?18:10??SkyLineDemo\Shape\B_RIVERTWO11.prj
?????文件????????588??2016-07-13?11:50??SkyLineDemo\Shape\B_RIVERTWO11.qix
?????文件????????332??2016-07-12?17:06??SkyLineDemo\Shape\B_RIVERTWO11.sbn
?????文件????????132??2016-07-12?17:06??SkyLineDemo\Shape\B_RIVERTWO11.sbx
?????文件????1443588??2016-07-12?17:06??SkyLineDemo\Shape\B_RIVERTWO11.shp
?????文件???????7590??2016-07-11?18:12??SkyLineDemo\Shape\B_RIVERTWO11.shp.xm
?????文件????????276??2016-07-12?17:06??SkyLineDemo\Shape\B_RIVERTWO11.shx
?????文件??????23310??2016-07-12?17:00??SkyLineDemo\Shape\T_RiskSource.dbf
?????文件????????145??2016-07-11?18:09??SkyLineDemo\Shape\T_RiskSource.prj
?????文件????????624??2016-07-13?11:59??SkyLineDemo\Shape\T_RiskSource.qix
?????文件????????308??2016-07-12?17:00??SkyLineDemo\Shape\T_RiskSource.sbn
?????文件????????124??2016-07-12?17:00??SkyLineDemo\Shape\T_RiskSource.sbx
?????文件????????660??2016-07-12?17:00??SkyLineDemo\Shape\T_RiskSource.shp
?????文件???????8042??2016-07-11?18:12??SkyLineDemo\Shape\T_RiskSource.shp.xm
?????文件????????260??2016-07-12?17:00??SkyLineDemo\Shape\T_RiskSource.shx
?????文件???????4293??2016-07-22?16:52??SkyLineDemo\SkyglobeLB.fly
?????文件???????1014??2016-07-29?17:48??SkyLineDemo\SkyLineDemo.sln
????..A..H.?????48128??2016-07-29?17:49??SkyLineDemo\SkyLineDemo.v12.suo
?????文件????????187??2016-07-26?10:18??SkyLineDemo\二三維聯動\App.config
?????文件??????17408??2016-07-28?17:07??SkyLineDemo\二三維聯動\bin\Debug\AxInterop.TerraExplorerX.dll
?????文件?????982528??2016-07-28?17:07??SkyLineDemo\二三維聯動\bin\Debug\Interop.TerraExplorerX.dll
............此處省略45個文件信息
- 上一篇:stm32f407VET6數據手冊.pdf中文資料
- 下一篇:哼唱音樂檢索系統的實現
評論
共有 條評論