9 1 2 AO Arc GIS Desktop Develop

  • Slides: 57
Download presentation

9. 1. 2 基于AO进行二次开发三个选择 • Arc. GIS Desktop Develop Kit • Arc. GIS Engine

9. 1. 2 基于AO进行二次开发三个选择 • Arc. GIS Desktop Develop Kit • Arc. GIS Engine Develop Kit • Arc. GIS Server Develop Kit –. Net Developer Framework – Java Developer Framework

9. 1. 2. 1 基于Arc. GIS Desktop Develop Kit 进行二次开发 • Arc. GIS的组件集合组成了 Arc.

9. 1. 2. 1 基于Arc. GIS Desktop Develop Kit 进行二次开发 • Arc. GIS的组件集合组成了 Arc. Objects。它提供了超过3, 000多 个独立的COM组件。 – 既可以通过内嵌的Microsoft Visual Basic for Application进行二次开发 – 也可以通过任何一个支持COM的编程 语言,如Visual Basic,Visual C++或 Delphi

 • Option Explicit • • Private m_p. Bitmap As IPicture. Disp Private m_p.

• Option Explicit • • Private m_p. Bitmap As IPicture. Disp Private m_p. Cursor As IPicture. Disp Private m_frm. Identify As frm. Identify. Tabs Private m_p. Hook. Helper As esri. Control. Commands. IHook. Helper • Implements esri. System. UI. ICommand • Implements esri. System. UI. ITool

Private Sub ITool_On. Mouse. Down(By. Val Button As Long, By. Val Shift As Long,

Private Sub ITool_On. Mouse. Down(By. Val Button As Long, By. Val Shift As Long, By. Val x As Long, By. Val y As Long) Dim p. Point As esri. Geometry. IPoint ' If the tool applies to an active view make sure the right map is showing If Type. Of m_p. Hook. Helper. Active. View Is esri. Carto. IPage. Layout Then Set p. Point = m_p. Hook. Helper. Active. View. Screen. Display. Transfor mation. To. Map. Point(x, y) Dim p. Map As esri. Carto. IMap Set p. Map = m_p. Hook. Helper. Active. View. Hit. Test. Map(p. Point) If p. Map Is Nothing Then Exit Sub If Not p. Map Is m_p. Hook. Helper. Focus. Map Then Set m_p. Hook. Helper. Active. View. Focus. Map = p. Map m_p. Hook. Helper. Active. View. Partial. Refresh esri. View. Graphics, Nothing End If

' Convert the mouse down point to map co-ordinates Dim p. Active. View As

' Convert the mouse down point to map co-ordinates Dim p. Active. View As esri. Carto. IActive. View Set p. Active. View = m_p. Hook. Helper. Focus. Map Set p. Point = p. Active. View. Screen. Display. Transformation. To. Map. Point(x, y) ' Get the features near the point plus the closest of them Dim p. Features As Collection Dim p. Feature As esri. Geo. Database. IFeature Get. Closest. Feature m_p. Hook. Helper. Focus. Map, p. Point, p. Features, p. Feature If (p. Feature Is Nothing) Then Exit Sub ' Populate and show the identify dialog Set m_frm. Identify. Active. View = m_p. Hook. Helper. Focus. Map m_frm. Identify. Populate. Feature. Tree p. Features, p. Feature Show. Tool. Window p. Active. View. Screen. Display. hwnd, m_frm. Identify. hwnd End Sub

9. 1. 2. 1 基于Arc. GIS Engine Develop Kit 进行二次开发 Arc. GIS Engine 是对Arc.

9. 1. 2. 1 基于Arc. GIS Engine Develop Kit 进行二次开发 Arc. GIS Engine 是对Arc. Objects的再封装 Arc. GIS Engine有两种产品: • Arc. GIS Engine Developer Kit—包括开发者建立解决 方案所需的组件和 具集。 • Arc. GIS Engine Runtime—运行定制的Arc. GIS Engine应用程序所需的基础设施。

 • Arc. GIS Engine 扩展模块

• Arc. GIS Engine 扩展模块

基于Arc. GIS Engine的二开发 • COM: Visual Basic

基于Arc. GIS Engine的二开发 • COM: Visual Basic

 • . Net: Visual Studio 2005

• . Net: Visual Studio 2005

 • Java: Eclipse( ) 日蚀

• Java: Eclipse( ) 日蚀

‘实现放大地图功能 Private Sub Map. Control 1_On. Mouse. Down(By. Val button As Long, By. Val

‘实现放大地图功能 Private Sub Map. Control 1_On. Mouse. Down(By. Val button As Long, By. Val shift As Long, By. Val x As Long, By. Val y As Long, By. Val map. X As Double, By. Val map. Y As Double) • If button = 1 Then • Map. Control 1. Extent = Map. Control 1. Track. Rectangle • Else. If button = 2 Then • Map. Control 1. Pan • End If End Sub