arcgis初学者必看

http://edndoc.esri.com/arcobjects/9.2/NET_Server_Doc/developer/scenarios/mobile_walk_pocketpc.htm

This walkthrough is for developers who wish to create and deploy a simple ArcGIS Mobile application for the PocketPC environment. It demonstrates how to create the application using the ArcGIS Mobile Map Control, the ArcGIS Mobile API and parts of ADO.NET.

You can find this sample in: <ArcGIS_install_location>"DeveloperKit"Samples"Server"NET"Mobile_Applications"Walkthrough_PPC03CSharp.zip

Project Description

The application will display map data that has been extracted from an ArcGIS Map Service using a Map Control, provide basic navigation tools such as zoom and pan, and include an identify function to show feature attributes. Once you complete this walkthrough, you can then extend the application you build with additional functionality.

Concepts

There are some important concepts you should understand before following this example. As a prerequisite, please read through the Mobile SDK conceptual documentation found under the heading Developing Mobile Applications using the Mobile ADF to gain an understanding of the mobile framework and architecture. You should also have a good understanding of Visual Studio .NET 2005 and how to create a Pocket PC application.

ArcGIS Server Mobile SDK Components

The ArcGIS Server Mobile SDK provides serveral Visual Studio components to help you develop mobile applications. The primary components that you will work with in this scenario are the Map Cache and the Map. The Map Cache component requests data stored in a folder called the Storage Path. Th map cache you will use has previously been extracted from a map web service that was published with mobile capabilities. You do not need to create a mobile web service to complete this walkthrough. The Map component will display the contents of the map cache that has been created for you without having to connect to a server. Additional components are used to navigate the map itself and identify attribute information for given features. For more information on the components used in this walkthrough please refer to the ArcGIS Server Developer Help.

Requirements

In order to walk through this scenario you will need the following installed on your machine:

  • Visual Studio .NET 2005 with C#
  • The ArcGIS Mobile SDK

This example is written in C# and will be deployed to the PocketPC 2003 emulator installed with Visual Studio. You should also reference the ArcGIS Mobile ADF object model diagram while proceeding through this example. You can find the OMD in ArcGIS Developer Help.


Implementation

In this example you will create a simple application within the PocketPC 2003 emulator that allows you to open a mobile map cache and display the map layers in a map control. You will then add additional controls that will let you navigate the map and identify features within the layers. The first step is to create the new project.

Creating a new project
  1. Start Visual Studio .NET 2005.
  2. On the File menu, point to New, then click Project .
  3. In the New Project dialog box, under Project Types, click Visual C#, expand Smart Device then click Pocket PC 2003 .
  4. In the Templates pane click Device Application .
  5. Enter an appropriate name for the project.
  6. Click OK. This will create a new project for you.

 

 

Using the Map Control at design time

The ArcGIS Mobile controls are added to the Visual studio toolbox when you install the ArcGIS Mobile ADF. They are located within the ArcGIS Mobile Controls tab within the toolbox. To use the controls within your application you must drag and drop them from the Toolbox to your windows form.

 

 

Within the following section, you will add both a Map and MapCache component to the application and configure their properties.

  1. Drag the Map component from the toolbox onto the form.
  2. Resize the Map to fill the desired area as indicated by the screen shot above.

When the Map component is added to the form, a MapCache component will be added to your project automatically. Your form should now contain a Map, called Map1, and a MapCache component called mapCache1. Additionally two new references have been added to your project, one to the Mobile ADF windows assembly and the other to the .NET System.Web.Services assembly.

You now need to configure the components via their properties.

  1. Right click the Map Control and choose Properties on the context menu to display its properties within the Properties window.
  2. Within the Properties window for Map1, set the MapCache property to mapCache1 if it is not already set.
  3. Now display the properties for the mapCache. Click the component mapCache1 in the Component pane within the application.
  4. Within the Properties window, select the StoragePath property and type "Temp"Redlands. Note that you will need to copy the Redlands map cache from the sample data folder to your temp folder. 

 

You now need to add code to open a map cache on disk and draw it on the map while the application is running.

  1. Create a form load event. You can do this by double-clicking on the form in the designer view.
  2. In the code view, first add a using statement above the Form1_Load event to include the ArcGIS Mobile assembly:
    [C#]
    using ESRI.ArcGIS.Mobile;
  3. Add the following code to the Form1_load event:
    [C#]
     private void Form1_Load(object sender, EventArgs e)
    {
    if (!mapCache1.IsValid)
    {
    MessageBox.Show("Map Cache is not valid!");
    return;
    }
    try
    {
    mapCache1.Open();
    }
    catch
    {
    MessageBox.Show("Cannot open map cache");
    }
    }

This code will open the mapcache, retrieve data for the current map extent and draw it to the display.

Application Hint: By default the application will display an X in the top right hand corner of the device when it is running. This allows you to place the application in the background but not shut it down. To stop the application completely you will have to stop the program from the device memory settings dialog. You can change this behavior by setting the MinimizeBox property on the form to False. This will display an Ok button on the running application form instead of an X. Clicking this button will stop the application. You may optionally set this property for the walkthrough.

Compile the application. On the Build menu, choose Build Solution. This will display the Repair Native Dll's dialog prompting you to add the Mobile ADF unmanaged library to the solution. Click OK to add the dll. This dialog is displayed if the unmanaged dll is missing or has a broken link and you build or run your application.

 

Configuring the PocketPC Emulator

You will use the PocketPC 2003 SE emulator to test the application but before you can it must be started and then virtually cradled.

  1. From the Visual Studio Tools menu choose Device Emulation Manager.
  2. In the Device Emulator Manager dialog, locate the PocketPC 2003 SE Emulator, right click and select Connect. This will start the device emulator.
  3. Right click again on the PocketPC 2003 SE Emulator entry and select Cradle. This will cradle the emulator via ActiveSync. Select a Guest partnership if asked for the type of ActiveSync relationship. Hint: If ActiveSync does not automatically connect to the device you can try this manually in ActiveSync by selecting File -> Connection Settings, then click the Connect button and follow the wizard.

 

 

NOTE:  Before running the application, you need to copy the map cache data from the samples' data directory to the emulators' "Temp folder. From the Tools menu in ActiveSync, click Explore Device and navigate to "Temp and paste the Redlands folder from <ArcGIS_Server_Install_Location>"DeveloperKit"SamplesNET"Server"data"mobile"MapCaches"Redlands.

You may now compile and run the application. Select the PocketPC 2003 SE emulator as the target device. At this stage the form should display layers from the map service in the map control.

Changing the Mouse behavior

Map actions are components designed to listen and react to events raised by the mouse, keyboard, and other input devices against the map surface. For instance pan mouse action listens to the MouseDown, MouseMove, and MouseUp events to begin, execute, and complete panning action.

A map can have multiple map actions associated with it however, by design only one is active or current. For instance a map can have zoom in, zoom out, pan, identify, and polygon sketch actions available, but at any given time only one action is executed. In this section you will add mapaction components and controls to the project to alter the mouse behavior.

 

 

  1. From the Visual Studio toolbox add the mobile Pan, Zoom in and Zoom Out map action components to the project.
  2. Select each of the components and set their Map property to Map1.
  3. Find the RadioButton control from the Visual Studio Toolbox and drag 3 of them onto the Form, similar to the screenshot above.
  4. Set the Text Property on each of them to Pan, In, and Out.
  5. Double click on each of the radio buttons to create a code block for the Check Changed Event for each button.
  6. Switch to the code view for the form and add the following using statement.
    [C#]
    using ESRI.ArcGIS.Mobile;
  7. Add the following code to the CheckChanged Events
    [C#]
    private void radioButton1_CheckedChanged(object sender, EventArgs e)
    {
    map1.CurrentMapAction = panMapAction1;
    }
    private void radioButton2_CheckedChanged(object sender, EventArgs e)
    {
    map1.CurrentMapAction = zoomInMapAction1;
    }
    private void radioButton3_CheckedChanged(object sender, EventArgs e)
    {
    map1.CurrentMapAction = zoomOutMapAction1;
    }
  8. Compile and run your application.

Your application should now be in a state where it will compile and run. In this state, you should be able to change the mouse action by simply toggling the radio buttons appropriately between panning, zooming in, and zooming out.

 

Adding Identify Capability

Much like the functionality contained within ArcMap, you can identify features inside the MapControl by querying the location identified by the mouse. In this section we will add some custom code to enable identify.

  1. Find the RadioButton control from the Windows Forms Toolbox and drag another to the Form.
  2. Set the Text Property on the new radio button to ID .
  3. Double click on the ID radio button to create a code block for the Check Changed Event.
  4. Add the following code to the CheckChanged event.
    [C#]
    private void radioButton4_CheckedChanged(object sender, EventArgs e)
    {
    map1.CurrentMapAction = null;
    }
  5. Add a mousedown event to the Map Control. With the Map Control active in the form, click Events in the Properties window. Find the MouseDown event in the list of events and double click it. This will create a code block for the event.
  6. Add the following code to the MapControl_MouseDown event.
    [C#]
    if (map1.CurrentMapAction != null)
    return;

    Cursor.Current = Cursors.WaitCursor;
    MapMouseEventArgs me = e as MapMouseEventArgs;
    Envelope qEnv = new Envelope(me.MapCoordinate, me.MapCoordinate);

    int mapTolerance = map1.ToMap(3);
    qEnv.Resize(mapTolerance, mapTolerance);

    QueryFilter qFilter = new QueryFilter(qEnv, EsriGeometricRelationship.Intersect);

    string txtResult = "Identify Results: ";
    int intFields;

    foreach (MapLayer lyr in map1.MapLayers)
    {
    FeatureLayer featLayerDT = lyr.Layer as FeatureLayer;

    if (featLayerDT == null)
    continue;

    txtResult += ""r"nLayer " + featLayerDT.Name;

    using (FeatureDataReader featReader = featLayerDT.GetDataReader(qFilter))
    {
    intFields = featReader.FieldCount;

    while (featReader.Read())
    {
    for (int i = 0; i < intFields; i++)
    txtResult += ""r"n" + featReader.GetName(i) + ": " + featReader.GetValue(i).ToString();
    }
    }
    }
    Cursor.Current = Cursors.Default;
    MessageBox.Show(txtResult);
  7. Compile and run the application.

Experiment with the application. Change the mouse modes via the radio buttons.

 

 


Deployment

The application may be deployed to a PocketPC2003 or Windows Mobile 5 device using either of the methods described in the Deploying mobile adf applications topic.

 

转载于:https://www.cnblogs.com/j3eee/archive/2009/02/22/1396024.html

【ArcGIS】ArcGIS10.6彻底卸载和ArcGIS10.2安装全过程 卸载python3后,解决了ArcGIS与python3冲突问题后,软件可以正常打开使用了但是还是出现了问题用ArcGIS 进行空间分析时,中间操作没有任何报错和问题,但是就是没有运行结果在别人的软件上操作一遍可以出现运行结果关闭确有这个,但真的不是我给它的运行时间不够,反反复复试了很多遍都没有运用结果不知道什么原因但打算卸载重装10,2的版本。 阅读详情

相关推荐

ArcGIS Desktop、ArcGIS Engine与ArcGIS Server区别

Dsktop用来处理图像,Engine用于开发组件,Server用于发布服务。 Desktop是一个数据分析处理为主的软件,可以对图做各种分析。 Engine是一个开发的软件,esri的arcgis产品都是用AO开发的,但是AO过于庞大、复杂,而且很多东西一般都用不到,所以他们把常用的删减下来,弄成了一个独立的产品,那就是arcengine。 Server是一个发布服务的工具或说平台,可以将很...

愤怒的小兵 6003

欢迎使用 ArcGIS 10 帮助库

欢迎使用 ArcGIS 10 帮助库

hsg77的专栏 2727

QGIS/ArcGIS用户必看:5分钟搞定NASA 90米DEM数据加载与地形分析

本文为QGIS/ArcGIS用户提供快速加载NASA 90米DEM数据并进行地形分析的实用指南。通过内置工具或插件,用户可在5分钟内完成从数据下载到等高线生成、坡度计算和山体阴影创建的全流程,大幅提升GIS工作效率。

aocan6909的博客 479

ArcGIS桌面开发之—COM模式

创建一个类库 开启VS2008,以Visual C# >> ArcGIS >>Extending ArcObjects下的Class Library (ArcMap)为模板创建一个新类库项目,将该项目命名为ArcMapCOM,选择合适的存储位置,单击确定,如下图所示: 删除class1 文件...

banyu4566的博客 357

ArcGIS 10.6 安装教程

一、ArcGIS Desktop 可使用 ArcMap、ArcCatalog、ArcGlobe 或 ArcScene 创建地图、执行空间分析、管理地理数据和共享结果。 ArcGIS Pro是一款新型应用程序,可供 ArcGIS Desktop 用户使用,它提供用于在 2D 和 3D 环境中显示、分析、编译和共享数据的工具。 百度一下相关软件包,进行下载。对于ArcGIS Desktop 软件安装包,下载解压后如下图所示。 安装过程如下。 1.1 安装LicenseManager 1.1.

飞火流云 9701

ArcGIS实验教程——实验一:ArcGIS软件的认识与使用

配套高清视频教程:《实验一:ArcGIS软件认识与使用(一)》、《实验一:ArcGIS软件的认识使用(二)》 实验目录 第一节 Esri简介 1.1 ESRI简介 1.2 Esri产品发展历程 第二节 ArcGIS简介 2.1 ArcGIS简介 2.2 ArcGIS产品体系 第三节 Desktop简介 3.1 Desktop简介 3.2 Desktop产品等级分类 3.3 Desktop产品组成 3.4 Desktop产品功能 第四节 ArcMap快速入门 4.1 ArcMa.

智慧空间实验室 3万+

ArcGIS 10 Engine DevelopKit 之安装与帮助;VBA,跨平台CPP,JAVA,ArcGIS Engine DevelopKit 10 的帮助如何打开...

ArcGIS Engine Developer Kit10 可以从VeryCD上下载到.其不需要破解,只需要你有一个已经安装好了的Lincense Manage.授权Engine即可. 下面是安装界面 可以看到有几项:Runtime / .net/C++/VBA/ArcSDE for Sql Server(x64+x86)/ArcGIS Data Interoperability Exte...

weixin_33912638的博客 362

ArcGIS初学者完全指南

在现代地理信息系统(GIS)的广泛应用中,ArcGIS系列软件已成为行业内的领头羊,被广泛应用于自然资源管理、城市规划、交通物流等多个领域。ArcGIS软件由美国环境系统研究所(ESRI)开发,提供一套集成的软件产品,旨在满足不同层次的GIS需求。ArcGIS提供不同版本的软件包,包括桌面产品ArcGIS Desktop、服务器产品ArcGIS Server、云平台ArcGIS Online等。它具备强大的数据收集、存储、管理、分析、展示及共享功能。

weixin_33557333的博客 3044

【技术教程】ArcGIS入门教程来袭,零基础的同学快看过来!

【Geodatabase】相当于创建出了一个文件包,我们可以在里面添加不同层级的各种要素,【Geodatabase】的子集为【要素数据集】,【要素数据集】的子集为【要素类】,一层一层向下分类,如3.2.1 中的脑图所示。在【目录】-【文件夹连接】中,右键点击我们的目标文件夹,选择【新建】-【Shapefile】,在打开的工具框中将名称修改为【现状道路】,将要素类型设置为【折线】。在【目录】中,右键单击【现状】,选择【导入】→【要素类(单个)】,然后选择【现状道路】为输入要素,【现状】为输出要素,就ok啦!

weixin_60784949的博客 1万+

ArcGIS初学者实操指南:从入门到案例应用

htmltable {th, td {th {pre {简介:本教程为初学者提供了一套完整而系统的ArcGIS实践操作指南,涵盖了从界面操作、数据管理、地图制作、空间分析、地理编码、制图表达、脚本编程、项目管理、报告输出到案例研究等十个关键学习模块。通过图文并茂的讲解与实战练习,学生可以快速掌握ArcGIS软件在地理数据处理与分析中的应用,为将来的专业工作打下坚实的基础。

weixin_42405592的博客 1314

Arcgis desktop,engine,developer.kit10.2 下载

ArcGIS desktop10.2,ArcGIS engine10.2,ArcGIS.Engine.Developer.kit.10.2

ArcGIS必会的几个工具的应用

本文分为两部分:第一部分:ArcGIS必会的几个工具的应用 第二部分ArcGIS一些常用操作方法总结 第一部分内容:ArcGIS必会的几个工具的应用 1、 筛选 第一个工具, 我们来看下 比较简单的 筛选工具的应用。筛选( select )的用法:从输入要素类或输入要素图层中提取要素(通常使用选择或结构化查询语言 (SQL) 表达式)...

xu780820的博客 1万+

ARCGIS初学者教程

arcgis 10.2安装教程,简单操作教程,带大家快速入门,方便大家工作。

ArcGIS教程 - 3 ArcGIS快速入门

实例数据:https://pan.baidu.com/s/184wwCmWrJdb-qjxsT614EQ 密码:dowv 第3章 ArcGIS快速入门 ArcGIS for Desktop是一套完整的专业GIS应用程序,包含有ArcMap、ArcCatalog、ArcToolbox、ArcScense、ArcGlobe和Model Builder等。其中ArcMap、ArcCata...

GIS Studio 9067

Transformers 中的 Softmax 可以并行加速么?

通过融合前两个计算步骤,降低执行Reduce_max和Reduce_sum等操作的通信开销。利用共享内存来存储临时数据,以减少对全局内存的访问成本。

stephen147的博客 1236

Sobel原理及计算过程详解

该算子包含两组3x3的矩阵,分别为横向及纵向,将之与图像作平面卷积,即可分别得出横向及纵向的亮度差分近似值。首先,我们需要构建一个Sobel算子,通常是一个 3x3 的矩阵。Sobel算子可以分别计算水平和垂直方向的梯度值,然后将两者合并得到总梯度值。索贝尔算子(Sobel operator)主要用作边缘检测,在技术上,它是一离散性差分算子,用来运算图像亮度函数的灰度近似值。所以,我们假设选择图像矩阵中的点A(1, 1),即第二行第二列的元素,对应的。接下来,我们将使用Sobel算子计算这个点的梯度值。

2301_76461741的博客 1万+

​GIS 初学者是选择 ArcGIS 还是 Pro,DeepSeek 给出了他的回答

最近 DeepSeek 大火,已经有不少博主将其运用到 GIS 行业,这里我们谈谈对于初学者,应该选择 ArcGIS 还是 Pro,看看 DeepSeek 的建议。对于 ArcGIS,DeepSeek 给出的优点是经典稳定和轻量简单,对于一款20多年的软件,确实很稳定,轻量简单则体现在对硬件的要求上,确实要求也较低。最后 DeepSeek 也指出 ArcGIS 并不是已经一无是处,对于某些特定场景,特别是一直使用ArcGIS 的电脑,ArcGIS 依然是最佳的选择。DeepSeek 的建议。

725

ABAP_自定义屏幕07—下拉列表框

ABAP_自定义屏幕07—下拉列表框 完成以下:页面中有下拉列表框,下拉框value=系统表SCRR的值 1、实现方法A-常用 1.1 在主程序定义字段 TYPES:BEGIN OF type_carrid, carrid LIKE scarr-carrid,"航线代码 carrname LIKE scarr-carrname,"航向名称 END OF type_carrid. DATA g_it_carrid TYPE STANDARD TABLE OF type_carrid

f346348157的博客 3872

ARCGIS10.2安装图文教程(含ARCGIS安装包))

三维地球APP扫码安装 ARCGIS安装教程(arcgis10.2(含ARCGIS安装包) ARCGIS需要的GIS数据可以从这里下载: 高清卫星影像 矢量等高线/高程 (点线面)标绘 ArcGis无偏移套合 AutoCad套合 道路图层(矢量数据) 准备工具:arcgis软件(arcgis:http://pan.baidu.com/s/1i5uMzU9)没有失效,复制地址在浏览器中打开 下载完成后解压,...

bigemap的博客 5500

STM32 SPI驱动TFT LCD实战:时序配置与硬件协同

SPI(串行外设接口)是一种高速、全双工、同步串行通信协议,广泛应用于微控制器与显示模组等外设的数据交互。其核心依赖时钟极性(CPOL)与时钟相位(CPHA)组合定义的四种工作模式,直接影响数据采样可靠性;而片选(NSS)与MOSI/SCLK等信号的硬件映射,则决定了多设备共总线下的通信稳定性。在TFT LCD驱动场景中,SPI凭借低开销、高吞吐优势成为主流选择,尤其适配ST7789、ILI9341等集成显示控制器的模块。本文聚焦STM32L系列MCU通过SPI2驱动1.3寸LCD的完整链路,涵盖Mode

php55的博客 1211

从零到千兆:KSZ9031 PHY芯片在Zynq PS端的驱动移植心路历程

本文详细记录了在Xilinx Zynq-7000平台(基于XC7Z020芯片)上,为KSZ9031千兆以太网PHY芯片移植LwIP协议栈驱动的完整过程。从硬件连接配置、Vivado工程设置到LwIP库的深度修改与调试,分享了解决PHY识别、自协商及性能优化等关键问题的实战经验,助力开发者实现稳定的千兆网络连接。

honey的博客 1117
上一篇: 基于.net的开源gis项目的收集整理
下一篇: Missing ArcGIS registry key
developer2016
博客等级 码龄10年 2粉丝 0原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值