资源简介
自己做的小例子,完整的ArcGIS Mobile 应用,地图的缩放、平移、要素的查询等。
代码片段和文件信息
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace SmartDeviceProject1
{
public partial class Form1 : Form
{
private ESRI.ArcGIS.Mobile.MobileServices.Featurelayer pFeaturelayer;
private ESRI.ArcGIS.Mobile.MobileServices.FeatureDataTable pFeaturetable;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender EventArgs e)
{
this.mobileService.CacheStoragePath = Environment.GetFolderPath(Environment.SpecialFolder.Personal).Replace(“My Documents“ ““) + @“Storage Card\My Documents\ArcGIS Mobile\well\MobileServiceCache“;
if (!this.mobileService.IsValid) return;
if (this.mobileService != null && this.mobileService.IsOpen)
this.mobileService.Close();
try
{
//打开缓存
this.mobileService.Open(ESRI.ArcGIS.Mobile.MobileServices.CacheOpenMode.Open);
this.mobileService.GetFeatureDataAsync(map false “GetFeatures“);
//打开底图
ESRI.ArcGIS.Mobile.SdcData.SdcMaplayer sdcMaplayer = new ESRI.ArcGIS.Mobile.SdcData.SdcMaplayer(@“\Storage Card\china\china.navmap“);
this.map.Maplayers.Add(sdcMaplayer);
}
catch(Exception ex)
{
MessageBox.Show(ex.Message.ToString());
}
}
private void toolBar1_Buttonclick(object sender ToolBarButtonclickEventArgs e)
{
switch (e.Button.Tag.ToString())
{
case “0“:
this.map.CurrentMapAction =new ESRI.ArcGIS.Mobile.MapActions.ZoomInMapAction();
break;
case “1“:
this.map.CurrentMapAction = new ESRI.ArcGIS.Mobile.MapActions.ZoomOutMapAction();
break;
case “2“:
this.map.CurrentMapAction = new ESRI.ArcGIS.Mobile.MapActions.PanMapAction();
break;
}
}
private void Query_Click(object sender EventArgs e)
{
if (QueryText.Text == ““)
{
MessageBox.Show(“请输入查询井名!“);
}
else
{
string wellname = QueryText.Text;
//获得查询图层
pFeaturelayer =(ESRI.ArcGIS.Mobile.MobileServices.Featurelayer)this.mobileService.layers[0];
//设置查询语句
ESRI.ArcGIS.Mobile.QueryFilter filter = new ESRI.ArcGIS.Mobile.QueryFilter();
filter.WhereClause = “WELL_NAME LIKE ‘“+wellname+“%‘“;
//获得查询结果
pFeaturetable = pFeaturelayer.GetDataTable(filternull);
//获得查询字段的索引
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 195 2009-09-10 17:06 SmartDeviceProject1\mssccprj.scc
文件 462336 2008-10-09 10:09 SmartDeviceProject1\SmartDeviceProject1\bin\Debug\ESRI.ArcGIS.Mobile.dll
文件 919977 2008-10-09 10:09 SmartDeviceProject1\SmartDeviceProject1\bin\Debug\ESRI.ArcGIS.Mobile.xm
文件 16896 2009-08-19 15:09 SmartDeviceProject1\SmartDeviceProject1\bin\Debug\SmartDeviceProject1.exe
文件 30208 2009-08-19 15:09 SmartDeviceProject1\SmartDeviceProject1\bin\Debug\SmartDeviceProject1.pdb
..A.SHR 259 2009-09-10 17:06 SmartDeviceProject1\SmartDeviceProject1\bin\Debug\vssver2.scc
文件 4877 2009-11-30 13:34 SmartDeviceProject1\SmartDeviceProject1\Form1.cs
文件 9521 2009-08-14 17:08 SmartDeviceProject1\SmartDeviceProject1\Form1.Designer.cs
文件 12174 2009-08-14 17:08 SmartDeviceProject1\SmartDeviceProject1\Form1.resx
文件 218 2009-09-10 17:06 SmartDeviceProject1\SmartDeviceProject1\mssccprj.scc
文件 19361 2009-08-19 15:09 SmartDeviceProject1\SmartDeviceProject1\obj\Debug\ResolveAssemblyReference.cache
文件 1936 2009-08-19 15:09 SmartDeviceProject1\SmartDeviceProject1\obj\Debug\SmartDeviceProject1.csproj.FileListAbsolute.txt
文件 847 2009-08-19 15:09 SmartDeviceProject1\SmartDeviceProject1\obj\Debug\SmartDeviceProject1.csproj.GenerateResource.Cache
文件 16896 2009-08-19 15:09 SmartDeviceProject1\SmartDeviceProject1\obj\Debug\SmartDeviceProject1.exe
文件 3796 2009-08-14 17:08 SmartDeviceProject1\SmartDeviceProject1\obj\Debug\SmartDeviceProject1.Form1.resources
文件 30208 2009-08-19 15:09 SmartDeviceProject1\SmartDeviceProject1\obj\Debug\SmartDeviceProject1.pdb
文件 180 2009-08-14 10:12 SmartDeviceProject1\SmartDeviceProject1\obj\Debug\SmartDeviceProject1.Properties.Resources.resources
..A.SHR 477 2009-09-10 17:06 SmartDeviceProject1\SmartDeviceProject1\obj\Debug\vssver2.scc
文件 366 2009-08-11 15:57 SmartDeviceProject1\SmartDeviceProject1\Program.cs
文件 1459 2009-08-11 15:57 SmartDeviceProject1\SmartDeviceProject1\Properties\AssemblyInfo.cs
文件 2375 2009-08-11 15:57 SmartDeviceProject1\SmartDeviceProject1\Properties\Resources.Designer.cs
文件 5618 2009-08-11 15:57 SmartDeviceProject1\SmartDeviceProject1\Properties\Resources.resx
..A.SHR 203 2009-09-10 17:06 SmartDeviceProject1\SmartDeviceProject1\Properties\vssver2.scc
文件 4235 2009-08-14 10:12 SmartDeviceProject1\SmartDeviceProject1\SmartDeviceProject1.csproj
文件 198 2009-08-11 16:01 SmartDeviceProject1\SmartDeviceProject1\SmartDeviceProject1.csproj.user
..A.SHR 295 2009-09-10 17:06 SmartDeviceProject1\SmartDeviceProject1\vssver2.scc
文件 1113 2009-08-11 15:58 SmartDeviceProject1\SmartDeviceProject1.sln
..A..H. 18944 2009-12-07 12:24 SmartDeviceProject1\SmartDeviceProject1.suo
..A.SHR 111 2009-09-10 17:07 SmartDeviceProject1\vssver2.scc
目录 0 2009-09-27 16:54 SmartDeviceProject1\SmartDeviceProject1\obj\Debug\Refactor
............此处省略11个文件信息
相关资源
- UDP异步通讯SocketAsyncEventArgs
- 台达PLC modbus通信上位机64位C#
- Tamir.SharpSS、访问sftp库
- 纯C#绘图控件 支持各种几何图形绘制
- C#实现滚动字幕完整源码_100.rar
- 例8_IO.zip雷赛运动控制卡C#案例
- 雷赛运动控制卡C#案例_定长运动.zip
- c#红绿灯程序源代码,c#红绿灯程序源
- C#委托和串行收发数据
- c# GUI+ 多种仪表盘显示
- C#无焦点后台读取扫码枪信息
- C# Http协议上传文件有进度条
- 数据库办公室日常信息管理系统c#源程
- C# Winfrom 嵌入 EXCEL
- wince5.0下C#绘制仪表盘控件及Demo源码
- C#标准正态分布类库
- C#串口通信上位机源代码
- 选择文件 选择文件 ( C#_DataTable控件
- C#文件粉碎机
- C#高级编程第10版带源码
- c#客户端与服务器端的开发经典案例
- 点阵字体文件查看工具 C# 源码
- 使用C#调用GDAL库读取GeoTIFF高程数据
- [c#]图片二值化研究源代码
- c shap 。net做报表,很不错
- C# 图片分割器,将一个大图分割为指
- C#简单实现凯撒密码算法
- c# Report 报表设计工具 设计布局打印
- C# WPF 状态栏图标特效 类似QQ/MSN的状态
- C# 生成三层架构代码
评论
共有 条评论