arcgis server mobile adf

53
ArcGIS Server Mobile ArcGIS Server Mobile ADF ADF ESRI ESRI 中中 中中 中中中 中中中

Upload: kasi

Post on 04-Feb-2016

158 views

Category:

Documents


0 download

DESCRIPTION

ArcGIS Server Mobile ADF. ESRI 中国 白旭阳. 议程安排. 介绍 什么是 Mobile ADF 适用情景 先决条件 Mobile ADF 架构简介 组件 查询 编辑 系统部署 问答. 什么是 Mobile ADF?. 与 ArcGIS Server 一起分发的一个开发包 . 使用 .Net 组件 开发自定义的 以 Server 为中心的 轻量级 移动 应用程序 支持简单 外业工作流程 数据浏览 数据检查 ( 属性编辑 ) 基础数据搜集 ( 红线数据 ) 连接与非连接 环境均适用 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: ArcGIS Server Mobile ADF

ArcGIS Server Mobile ADFArcGIS Server Mobile ADF

ESRIESRI 中国中国白旭阳白旭阳

Page 2: ArcGIS Server Mobile ADF

议程安排议程安排

•介绍介绍– 什么是 什么是 Mobile ADFMobile ADF– 适用情景适用情景

•先决条件先决条件•Mobile ADFMobile ADF

– 架构简介 架构简介 – 组件组件– 查询查询– 编辑编辑

•系统部署系统部署•问答问答

Page 3: ArcGIS Server Mobile ADF

什么是什么是 Mobile ADF?Mobile ADF?

•与与 ArcGIS ServerArcGIS Server 一起分发的一个开发包一起分发的一个开发包 ..•使用使用 .Net.Net 组件组件开发自定义的开发自定义的以以 ServerServer 为中心的为中心的轻量级轻量级移移

动动应用程序应用程序•支持简单支持简单外业工作流程外业工作流程

– 数据浏览数据浏览– 数据检查数据检查 (( 属性编辑属性编辑 ))– 基础数据搜集基础数据搜集 (( 红线数据红线数据 ))

•连接与非连接连接与非连接环境均适用环境均适用•可用于可用于 Windows MobileWindows Mobile 环境和平板电脑环境和平板电脑

Page 4: ArcGIS Server Mobile ADF

交通事故数据采集交通事故数据采集应用需求应用需求

•某市交通管理部门下属的交通事故数据采集机构希望能有某市交通管理部门下属的交通事故数据采集机构希望能有满足如下需求的解决方案满足如下需求的解决方案 ::– 办公无纸化办公无纸化– 几乎实时的信息汇报几乎实时的信息汇报– 最少的数据采集成本最少的数据采集成本

• 针对性强的应用程序针对性强的应用程序• 不用回到办公室即可完成工作不用回到办公室即可完成工作

– 简单的数据部署与综合简单的数据部署与综合

Page 5: ArcGIS Server Mobile ADF

GIS Server

交通事故数据采集交通事故数据采集解决方案解决方案

• 为外业应用准备所需的数据和地为外业应用准备所需的数据和地图。图。

• 使用使用 ArcGIS serverArcGIS server 将地图以一将地图以一个 个 webservicewebservice 的形式发布出来。的形式发布出来。

• 为外业设备创建符合特定需求的为外业设备创建符合特定需求的应用程序。应用程序。

• 外业设备装载特定的应用程序和外业设备装载特定的应用程序和所需的数据后发放给数据采集人所需的数据后发放给数据采集人员。员。

• 数据采集人员获取指定数据数据采集人员获取指定数据• 设备自动将数据与服务器同步设备自动将数据与服务器同步• 新的数据即可被后方部门用于分新的数据即可被后方部门用于分

析和决策。析和决策。

WebServices

PDA

PDA

PDA

Page 6: ArcGIS Server Mobile ADF

示例示例

交通事故数据采集人员交通事故数据采集人员地图制作地图制作地图发布地图发布

Page 7: ArcGIS Server Mobile ADF

表:血液、呼气酒精含量与事故相对危险度表:血液、呼气酒精含量与事故相对危险度

血液酒精含量

(mg/100m

l)

呼气酒精含量

( ug/100m

l) 主要表现 事故相对危

险度 *

10~ 49 5~ 24 精神愉快,飘然感,注意力、判断力降低 1

50~ 99 25~ 49兴奋,肌肉协调能力减弱,敏感反应降低,

语无伦次 1.5

100~149

50~ 74 自然感觉好,易激动,吵闹,控制力降低 2.5

150~199

75~ 99情绪易变,口齿不清,共济失调,判断力迟

钝,不能进行职业操作 9.7

200以上 100以上 精神混乱,失去平衡能力,语言含糊,定向力降低或丧失,对外界反应冷淡、呆滞 9.7以上

Page 8: ArcGIS Server Mobile ADF

GIS Server

交通事故数据采集交通事故数据采集解决方案解决方案

• 为外业应用准备所需的数据和地为外业应用准备所需的数据和地图。图。

• 使用使用 ArcGIS serverArcGIS server 将地图以一将地图以一个 个 webservicewebservice 的形式发布出来。的形式发布出来。

• 为外业设备创建符合特定需求的为外业设备创建符合特定需求的应用程序。应用程序。

• 外业设备装载特定的应用程序和外业设备装载特定的应用程序和所需的数据后发放给数据采集人所需的数据后发放给数据采集人员。员。

• 数据采集人员获取指定数据数据采集人员获取指定数据• 设备自动将数据与服务器同步设备自动将数据与服务器同步• 新的数据即可被后方部门用于分新的数据即可被后方部门用于分

析和决策。析和决策。

WebServices

PDA

PDA

PDA

Page 9: ArcGIS Server Mobile ADF

Mobile ADFMobile ADF (移动应用程序开发框架)(移动应用程序开发框架)满足外业需求的新技术满足外业需求的新技术

• 外业数据挖掘外业数据挖掘• 外业数据提交外业数据提交• 外业数据搜集外业数据搜集• 外业数据审查外业数据审查• 外业量测外业量测• 工作流管理工作流管理

资产管理

资产报告 (GASB 34)

消防栓 维护

垃圾箱管理

城市设施检查

电力附属设置检查

设施改造报告

Page 10: ArcGIS Server Mobile ADF

什么是什么是 Mobile ADF?Mobile ADF?

ArcGIS ServerArcGIS Server

开发解决方案开发解决方案专业的移动应用专业的移动应用

Page 11: ArcGIS Server Mobile ADF

议程安排议程安排

•介绍介绍– 什么是 什么是 Mobile ADFMobile ADF– 适用情景适用情景

•先决条件先决条件•Mobile ADFMobile ADF

– 架构简介 架构简介 – 组件组件– 查询查询– 编辑编辑

•系统部署系统部署•问答问答

Page 12: ArcGIS Server Mobile ADF

Mobile ADFMobile ADF 开发人员应具备的条件开发人员应具备的条件

•熟悉熟悉– .Net Framework 2.0 .Net Framework 2.0 – .Net Compact Framework 2.0 .Net Compact Framework 2.0 – C# or VB.NETC# or VB.NET

• Visual Studio 2005Visual Studio 2005• SDK for Windows Mobile 5.0 for SDK for Windows Mobile 5.0 for

Pocket PC 5.0 developmentPocket PC 5.0 development• SDK for Windows Mobile 5.0 for SDK for Windows Mobile 5.0 for

Smartphone 5.0 developmentSmartphone 5.0 development•已安装了已安装了 Active Sync 4.1Active Sync 4.1• 对对 ADO.NetADO.Net概念有深入理解概念有深入理解•熟悉用于测试部署的移动设备熟悉用于测试部署的移动设备•熟悉熟悉 GPSGPS 设备设备• 设备维护设备维护•熟悉外业工作流程熟悉外业工作流程•熟悉熟悉 ArcGIS ServerArcGIS Server

Page 13: ArcGIS Server Mobile ADF

推荐阅读推荐阅读

• Team Beta BlogTeam Beta Bloghttp://blogs.esri.com/roller/page/Beta92ArcGISSrvrMblADFThttp://blogs.esri.com/roller/page/Beta92ArcGISSrvrMblADFT

• .Net Compact Framework .Net Compact Framework http://msdn.microsoft.com/netframework/programming/netcf/default.aspxhttp://msdn.microsoft.com/netframework/programming/netcf/default.aspxhttp://msdn.microsoft.com/vstudio/tour/vs2005_guided_tour/VS2005pro/Smart_Client/NEhttp://msdn.microsoft.com/vstudio/tour/vs2005_guided_tour/VS2005pro/Smart_Client/NETCFOverview.htmTCFOverview.htm

• ADO.Net ADO.Net http://msdn2.microsoft.com/en-us/library/h43ks021.aspxhttp://msdn2.microsoft.com/en-us/library/h43ks021.aspx

• Mobile Development and DeploymentMobile Development and Deploymenthttp://http://msdn.microsoft.commsdn.microsoft.com/mobility//mobility/

• Smart Client DevelopmentSmart Client Developmenthttp://msdn.microsoft.com/smartclient/http://msdn.microsoft.com/smartclient/

• Microsoft Patterns and Practices: Microsoft Patterns and Practices: Mobile Client Software FactoryMobile Client Software Factoryhttp://msdn.microsoft.com/practices/default.aspx?pull=/library/en-us/dnpag2/html/mcsflp.http://msdn.microsoft.com/practices/default.aspx?pull=/library/en-us/dnpag2/html/mcsflp.aspasp

• Multithreading in .NetMultithreading in .Nethttp://msdn2.microsoft.com/en-us/library/5xt1dysy.aspxhttp://msdn2.microsoft.com/en-us/library/5xt1dysy.aspx

• GPS TutorialGPS Tutorialhttp://http://www.trimble.com/gpswww.trimble.com/gps//

Page 14: ArcGIS Server Mobile ADF

.NET Compact Framework.NET Compact Framework

•.Net Framework.Net Framework 的子集的子集•为小型设备做了优化为小型设备做了优化•并非所有功能和并非所有功能和 .Net Framework.Net Framework 一样一样•阅读相关文档阅读相关文档

•可使用可使用 Visual StudioVisual Studio 的设备模拟器开发,真实设备测试的设备模拟器开发,真实设备测试和部署和部署

Page 15: ArcGIS Server Mobile ADF

示例示例

Visual Studio 2005 Visual Studio 2005 平台及开发包平台及开发包

设备模拟器设备模拟器开发组件开发组件

部署部署

Page 16: ArcGIS Server Mobile ADF

议程安排议程安排

•介绍介绍– 什么是 什么是 Mobile ADFMobile ADF– 适用情景适用情景

•先决条件先决条件•Mobile ADFMobile ADF

– 架构简介 架构简介 – 组件组件– 查询查询– 编辑编辑

•系统部署系统部署•问答问答

Page 17: ArcGIS Server Mobile ADF

Mobile ADFMobile ADF 要点要点

•是是 ArcGIS ServerArcGIS Server 面对移动设备的开发包面对移动设备的开发包 ::– .Net Mobile.Net Mobile 下下 GISGIS 组件组件– 为为 Client-ServerClient-Server 形式的应用程序而设计形式的应用程序而设计– 支持多种连通性情况支持多种连通性情况–长事务和短事务长事务和短事务–版本化的编辑版本化的编辑–具有离线编辑能力具有离线编辑能力– 使用使用 Visual Studio 2005 WinForms Visual Studio 2005 WinForms – 低系统资源消耗,高性能低系统资源消耗,高性能

Page 18: ArcGIS Server Mobile ADF

GIS Server

Enterprise BusEnterprise Bus

Server ArchitectureServer Architecture

WebServices

Laptop

Desktop

TabletPC

Smartphone

Pocket PC

Page 19: ArcGIS Server Mobile ADF

Mobile ADFMobile ADF 部署平台部署平台

•Microsoft .NET/.NET Compact Framework 2.0Microsoft .NET/.NET Compact Framework 2.0•Windows Mobile 5.0Windows Mobile 5.0

– PocketPCPocketPC– SmartPhoneSmartPhone

•Windows Mobile for Pocket PC 2003, 2003 SEWindows Mobile for Pocket PC 2003, 2003 SE•Windows CE 5.0Windows CE 5.0•Windows XPWindows XP

Page 20: ArcGIS Server Mobile ADF

企业级企业级 MobileMobile 架构架构

• Existing SystemsExisting Systems–GDB ReplicationsGDB Replications

–SDESDE

• Mobile ServerMobile Server–Web servicesWeb services

–Staging of dataStaging of data

• Mobile ClientMobile Client–Map, MapActionsMap, MapActions

–MapCacheMapCache

–ServerConnectionServerConnection

GPRS

EDGE

HSDPA

802.11

Cradle

Con

nectiv

ity

Secu

rity

Web Services

Server Manager

Web Services & Data

Man

ag

em

en

t

User ExperienceUser Experience

Business LogicBusiness Logic

Data & Web SvcData & Web Svc

ArcGIS ServerMobile ADF Enterprise Systems

Page 21: ArcGIS Server Mobile ADF

议程安排议程安排

•介绍介绍– 什么是 什么是 Mobile ADFMobile ADF– 适用情景适用情景

•先决条件先决条件•Mobile ADFMobile ADF

– 架构简介架构简介 – 组件组件– 查询查询– 编辑编辑

•系统部署系统部署•问答问答

Page 22: ArcGIS Server Mobile ADF

Mobile ADFMobile ADF

网络

资源

网络

资源

WindowsWindows 窗体窗体

.Net Framework / Compact .Net Framework.Net Framework / Compact .Net Framework

数据同步数据同步服务服务

设备数据设备数据存储器存储器

用户交互控件用户交互控件

数据访问数据访问 APIAPI

Page 23: ArcGIS Server Mobile ADF

Mobile ADFMobile ADF 核心组件核心组件

MapCacheMapCache

ServerServerConnectionConnection

MapMapMapActionMapAction

ArcGISArcGISServerServer

Page 24: ArcGIS Server Mobile ADF

MapCacheMapCache

•Map DocumentMap Document 的本地副本的本地副本•包含如下内容包含如下内容 ::

– FeatureLayersFeatureLayers– RasterLayersRasterLayers– AnnotationLayersAnnotationLayers

•对数据可进行如下操作对数据可进行如下操作 ::– 添加添加– 删除删除– 编辑编辑

Page 25: ArcGIS Server Mobile ADF

GeometryGeometry

•基于整数表达基于整数表达– Windows Windows 移动设备中无数学运算器移动设备中无数学运算器

•Points, multipoints, lines, polygonsPoints, multipoints, lines, polygons•支持的操作支持的操作

– Distance, Distance, – Equality, Equality, – Relationship Relationship

• TouchesTouches• IntersectsIntersects• WithinWithin• OverlapOverlap• CrossCross• ContainContain• DisjointDisjoint

•不支持 不支持 splitting, joining, buffering splitting, joining, buffering

Page 26: ArcGIS Server Mobile ADF

ServerConnectionServerConnection

•ServerConnectionServerConnection– MapCacheMapCache 与服务器之间的数据同步与服务器之间的数据同步– URLURL 地址连接发布的地址连接发布的 MobileServer WebServiceMobileServer WebService– 异步执行异步执行– 支持支持 SoapSoap 和和 BinaryBinary 两种两种 ArcGIS server Web ServicesArcGIS server Web Services

Page 27: ArcGIS Server Mobile ADF

MapActionMapAction

•通过通过 Map EventsMap Events 与地图交互或修改地图与地图交互或修改地图•漫游动作漫游动作

– ZoomInZoomIn– ZoomOutZoomOut– PanPan

•要素动作要素动作– SketchSketch– SelectionSelection

•自定义自定义 MapActionMapAction

Page 28: ArcGIS Server Mobile ADF

自定义 自定义 MapActionMapAction

•组件允许用户与地图和输入设备进行交互组件允许用户与地图和输入设备进行交互•简化复杂的工作流并将其封装入一个简单工具简化复杂的工作流并将其封装入一个简单工具•创建并分发专用组件创建并分发专用组件•实现实现 MapActionMapAction 类类

Page 29: ArcGIS Server Mobile ADF

Gps Gps 组件组件

FileGpsFileGps

MapMap

SerialPortSerialPortGpsGps

ConnectionConnection

GpsDisplayGpsDisplay

ScaleBarScaleBar

NMEANMEA

Page 30: ArcGIS Server Mobile ADF

Gps Gps 组件组件

•GPS GPS 连接连接– 识别 识别 NMEA NMEA 数据流数据流– FileGpsConnection FileGpsConnection 和 和 SerialPortGpsConnectionSerialPortGpsConnection– GPS GPS 数据以 数据以 WGS84 WGS84 坐标系下的坐标系下的 纬度纬度 // 经度 形式存储 经度 形式存储 – 使用使用 SpatialReference SpatialReference 类支持投影类支持投影 ::

• Lambert Conformal Conic,Lambert Conformal Conic,• Mercator,Mercator,• Transverse Mercator,Transverse Mercator,• StereographicStereographic

•GpsDisplayGpsDisplay– 与与 Map Map 和 和 GPS GPS 连接绑定连接绑定– 显示当前位置,轨迹和显示当前位置,轨迹和 Re-center MapRe-center Map

Page 31: ArcGIS Server Mobile ADF

ScaleBarScaleBar

•直接与直接与 MapMap 绑定绑定•采用公制和采用公制和 USUS惯例惯例•可调整大小或固定宽度可调整大小或固定宽度•可显示服务器同步进度可显示服务器同步进度

Page 32: ArcGIS Server Mobile ADF

议程安排议程安排

•介绍介绍– 什么是 什么是 Mobile ADFMobile ADF– 适用情景适用情景

•先决条件先决条件•Mobile ADFMobile ADF

– 架构简介架构简介 – 组件组件– 查询查询– 编辑编辑

•系统部署系统部署•问答问答

Page 33: ArcGIS Server Mobile ADF

ADO.Net ADO.Net 接口接口

RasterRasterLayerLayer

FeatureFeatureDataReaderDataReader

FeatureLayerFeatureLayerDataTableDataTable

MapCacheMapCache

FeatureFeatureLayerLayer

AnnotationAnnotationLayerLayer

Layer Layer CollectionCollection

ADO.NetADO.Net

Page 34: ArcGIS Server Mobile ADF

查询数据查询数据

• 对地图缓存中的矢量图层进行空间和属性查询对地图缓存中的矢量图层进行空间和属性查询•结果数据读取入结果数据读取入

– FeatureLayerDataTable (ADO DataTable)FeatureLayerDataTable (ADO DataTable)– FeatureDataReader (ADO IDataReader)FeatureDataReader (ADO IDataReader)

• ReaderReader– 速度快速度快– 仅能单向遍历仅能单向遍历– 较小的内存消耗较小的内存消耗

• DataTableDataTable– 速度较慢速度较慢– 可向前向后双向遍历可向前向后双向遍历

• 查询是在本地数据中执行的查询是在本地数据中执行的• Reader Reader 适于读取,适于读取, DataTable DataTable 适于编辑和绑定数据控件适于编辑和绑定数据控件

Page 35: ArcGIS Server Mobile ADF

FeatureDataReaderFeatureDataReader

Polygon polygon;long area = 0;QueryFilter queryFilter = new QueryFilter(map1.GetFullExtent(), EsriGeometricRelationship.Within, "Owner = 'Smith'", true);using (FeatureDataReader reader = layer.GetDataReader(queryFilter, "Parcels")) { while (reader.Read()) { polygon = reader.GetGeometry as Polygon; area += polygon.GetArea(); } }MessageBox.Show("Smith owns area of " + mapCache1.SpatialReference.FromGeometry(area).ToString())

Page 36: ArcGIS Server Mobile ADF

FeatureLayerDataTableFeatureLayerDataTable

Polygon polygon;long area = 0;QueryFilter queryFilter = new QueryFilter(map1.GetFullExtent(), EsriGeometricRelationship.Within, "Owner = 'Smith'", true);FeatureLayerDataTable table = layer.GetDataTable(queryFilter, "Parcels");

foreach (DataRow row in table) { polygon = row[table.GeometryColumnIndex] as Polygon; area += polygon.GetArea(); }

MessageBox.Show("Smith owns area of " + mapCache1.SpatialReference.FromGeometry(area).ToString())

Page 37: ArcGIS Server Mobile ADF

示例示例

基于 基于 FeatureLayerDataTable FeatureLayerDataTable 进行查询进行查询

Page 38: ArcGIS Server Mobile ADF

Display ExpressionDisplay Expressiona.k.a. Definition Queriesa.k.a. Definition Queries

•Display expressionDisplay expression 改变地图中的数据表达改变地图中的数据表达•该方法应用于该方法应用于 MapLayer (MapLayer ( 并非并非 FeatureLayer)FeatureLayer)

// // 仅显示省会城市 仅显示省会城市 // // 并且人口超过并且人口超过 200200 万万 . .

map1.MapLayers[map1.MapLayers[“cities”“cities”].DisplayExpression ].DisplayExpression = = ““Capital = 'yes‘Capital = 'yes‘ AND POP_2000 > 2000000” AND POP_2000 > 2000000”;;

Page 39: ArcGIS Server Mobile ADF

议程安排议程安排

•介绍介绍– 什么是 什么是 Mobile ADFMobile ADF– 适用情景适用情景

•先决条件先决条件•Mobile ADFMobile ADF

– 架构简介架构简介 – 组件组件– 查询查询– 编辑编辑

•系统部署系统部署•问答问答

Page 40: ArcGIS Server Mobile ADF

使用使用 Mobile ADFMobile ADF 进行编辑进行编辑

•仅后台数据来自于仅后台数据来自于 SDESDE 的图层才可编辑的图层才可编辑•数据编辑可在离线状态下进行数据编辑可在离线状态下进行•仅当数据提交到服务器时才需要进行连接仅当数据提交到服务器时才需要进行连接•Client-serverClient-server模式编辑使用短事务模式编辑使用短事务•编辑支持非版本化和版本化的数据库编辑支持非版本化和版本化的数据库•几何体的编辑是通过 几何体的编辑是通过 Sketch Sketch 组件完成的组件完成的•属性编辑是通过 属性编辑是通过 ADO.Net ADO.Net 组件完成的组件完成的

Page 41: ArcGIS Server Mobile ADF

ADO.NetADO.Net 编辑数据工作流编辑数据工作流

•从 从 FeatureLayerFeatureLayer 获取中 获取中 DataTableDataTable•从 从 DataTable DataTable 中编辑要素中编辑要素 ::

– 获取一个已有要素,编辑或删除获取一个已有要素,编辑或删除– 添加一个新要素添加一个新要素

•传回 传回 DataTable DataTable 对象以更新 对象以更新 FeatureLayerFeatureLayer•当与服务器的连接有效时提交 当与服务器的连接有效时提交 FeatureLayer FeatureLayer 的更新的更新

Page 42: ArcGIS Server Mobile ADF

编辑数据编辑数据

// Get the FeatureLayer DataTable// Get the FeatureLayer DataTableFeatureLayer featureLayer = mapCache1.cacheLayers[0] as FeatureLayer featureLayer = mapCache1.cacheLayers[0] as FeatureLayerFeatureLayer

FeatureLayerDataTable table = featureLayer.GetDataTable();FeatureLayerDataTable table = featureLayer.GetDataTable();

// Create a new Feature// Create a new FeatureDataRow editedFeature = DataRow editedFeature = ttable.NewRow();able.NewRow();editedFeature[editedFeature[tabletable.GeometryColumnIndex] = new .GeometryColumnIndex] = new ESRI.ArcGIS.Mobile.Point(e.MapCoordinate);ESRI.ArcGIS.Mobile.Point(e.MapCoordinate);

editedFeature[“editedFeature[“OwnerOwner"] ="] = “John Doe”; “John Doe”;tabletable.Rows.Add(editedFeature);.Rows.Add(editedFeature);

// Update FeatureLayer// Update FeatureLayertabletable.UpdateFeatureLayer();.UpdateFeatureLayer();

// // PPost ost updated updated data to the server data to the server serverConnection1.PostFeaturesAsync();serverConnection1.PostFeaturesAsync();

Page 43: ArcGIS Server Mobile ADF

示例示例

编辑编辑

Page 44: ArcGIS Server Mobile ADF

非版本化的数据库非版本化的数据库• 数据库由 数据库由 GIS GIS 管理员安装管理员安装• 以最后的外业编辑为准以最后的外业编辑为准版本化的数据库版本化的数据库• 包含上面的特性包含上面的特性• 版本与其发布的版本与其发布的 mxdmxd 是一样的是一样的• 用户可编辑任何名称的数据库版本用户可编辑任何名称的数据库版本编辑为设备创建的编辑为设备创建的空间数据库版本空间数据库版本• 服务器为每个客户端请求服务器为每个客户端请求

创建版本创建版本• 所有编辑存储在自定义版本中所有编辑存储在自定义版本中• 编辑完成后版本被编辑完成后版本被

调和调和

所支持的编辑情景所支持的编辑情景

Page 45: ArcGIS Server Mobile ADF

短事务编辑短事务编辑

•依靠版本和非版本数据库依靠版本和非版本数据库•最后提交生效模式最后提交生效模式•服务器与客户端之间为原子化事务服务器与客户端之间为原子化事务•不支持 不支持 undo undo 或 或 redo redo 操作操作•基于单一版本,没有为多个外业工作者基于单一版本,没有为多个外业工作者提供冲突处理机制提供冲突处理机制

•客户端连接到一个已知的现有版本客户端连接到一个已知的现有版本•不同的版本可用于将相同工作区中工作不同的版本可用于将相同工作区中工作

组的工作分离,以减少潜在冲突发生的组的工作分离,以减少潜在冲突发生的可能性可能性

Geodatabase

Editor

Editor

Page 46: ArcGIS Server Mobile ADF

服务器版本间的切换服务器版本间的切换

FeatureLayer layer = mapCache1.CacheLayers[0] as FeatureLayer layer = mapCache1.CacheLayers[0] as FeatureLayer;FeatureLayer; // switch from the Default version // switch from the Default version // // to to the the Engineering versionEngineering version// you must know which versions are available// you must know which versions are available

if (layer.Workspace.VersionName == "Default")if (layer.Workspace.VersionName == "Default") layer.EditingVersionName = "Engineering";layer.EditingVersionName = "Engineering";

// Perform editing // Perform editing //...//...// serverConnection1.PostFeaturesAsync();// serverConnection1.PostFeaturesAsync();

// Switch back to the original version if needed.// Switch back to the original version if needed.layer.EditingVersionName = "Default";layer.EditingVersionName = "Default";

Page 47: ArcGIS Server Mobile ADF

为编辑创建的专用版本 为编辑创建的专用版本

•设备可请求服务器为编辑创建一个专设备可请求服务器为编辑创建一个专用版本用版本 ..

•当外业工作完成后,专用版本可提交当外业工作完成后,专用版本可提交和调和和调和 ..

•如果发现冲突,该版本将被保留在服如果发现冲突,该版本将被保留在服务器上,待服务器端手动调和务器上,待服务器端手动调和 ..

Default

Dept 1Default

FieldEditor 2

Editor

Field Editor

1

Editor

Page 48: ArcGIS Server Mobile ADF

Using Dedicated VersionsUsing Dedicated Versions

// Editing first layer // Editing first layer FeatureLayer layer = mapCache1.CacheLayers[0] as FeatureLayer layer = mapCache1.CacheLayers[0] as FeatureLayer;FeatureLayer;

serverConnection1.CreateDedicatedVersionAsync(serverConnection1.CreateDedicatedVersionAsync( layer.Workspace.WorkspaceId,layer.Workspace.WorkspaceId, "Tom_June16_Edits_Pasadena", "Tom_June16_Edits_Pasadena", null);null);

// perform edits agains// perform edits againstt the version the version// ...// ...// serverConnection1.PostFeaturesAsync()// serverConnection1.PostFeaturesAsync()// // serverConnection1.CloseDedicatedVersionAsync(serverConnection1.CloseDedicatedVersionAsync( layer.Workspace.WorkspaceId,layer.Workspace.WorkspaceId, EsriCloseVersionOptions.ReconcilePostVersion,EsriCloseVersionOptions.ReconcilePostVersion, null);null);

Page 49: ArcGIS Server Mobile ADF

议程安排议程安排

•介绍介绍– 什么是 什么是 Mobile ADFMobile ADF– 适用情景适用情景

•先决条件先决条件•Mobile ADFMobile ADF

– 架构简介架构简介 – 组件组件– 查询查询– 编辑编辑

•系统部署系统部署•问答问答

Page 50: ArcGIS Server Mobile ADF

应用程序与数据部署应用程序与数据部署

Connection

ArcGIS Server

Data Extraction

Editing Application Viewing Application

Day to Day synchronization from

the Field

Deployment

Web Service

MapCache Extractor

ApplicationDevelopment

Visual Studio

Mobile Applications

Posts EditsRefresh Data

Page 51: ArcGIS Server Mobile ADF

Mobile ADF Mobile ADF 的数据提取的数据提取

ArcGISArcGISServerServer

ServerServerConnectionConnection MapCacheMapCache

MapMap

MapCache MapCache ExtractorExtractor

DeployDeploy

Page 52: ArcGIS Server Mobile ADF

Mobile ADF Mobile ADF 应用程序与数据部署应用程序与数据部署

• Smart DevicesSmart Devices– CAB fileCAB file– XCopyXCopy

• DesktopDesktop– MSIMSI– XCopyXCopy– Click OnceClick Once

Page 53: ArcGIS Server Mobile ADF

问答问答