资源简介

放大缩小平移全图 添加要素 点线面 点面框选 属性查询 空间查询

资源截图

代码片段和文件信息

using System;

using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ESRI.ArcGIS.Mobile;
using ESRI.ArcGIS.Mobile.Geometries;
using ESRI.ArcGIS.Mobile.MobileServices;
using ESRI.ArcGIS.Mobile.MapActions;
using ESRI.ArcGIS.Mobile.Sketch;

namespace SmartDeviceProject2
{
    public partial class Form2 : Form
    {
        private ESRI.ArcGIS.Mobile.Geometries.Point m_point;
        private Multipoint m_mpoint;
        private CoordinateCollection m_coordinateCollection;
        private Polygon m_polygon;
        int flag1 = 0;
        // 鼠标按下时记录的坐标
        private Coordinate m_startCoordinate;
        // 鼠标抬起时记录的坐标
        private Coordinate m_endCoordinate;

        private Polyline m_polyline;

        public Form2()
        {
            InitializeComponent();
        }

        private void menuItem2_Click(object sender EventArgs e)
        {
            this.map1.CurrentMapAction = zoomInMapAction1;
        }

        private void menuItem3_Click(object sender EventArgs e)
        {
            this.map1.CurrentMapAction = zoomOutMapAction1;
        }

        private void menuItem4_Click(object sender EventArgs e)
        {
            this.map1.CurrentMapAction = panMapAction1;
        }

        private void menuItem5_Click(object sender EventArgs e)
        {
            this.map1.SetExtent(this.map1.GetFullExtent());
        }

        private void menuItem6_Click(object sender EventArgs e)
        {
            this.map1.CurrentMapAction = null;
            flag1 = 1;
        }

        private void Form2_Load(object sender EventArgs e)
        {
            this.mobileService1.CacheStoragePath = @“storage card\test“;
            if (!this.mobileService1.IsValid)
                return;
            if (this.mobileService1 != null && this.mobileService1.IsOpen)
                this.mobileService1.Close();

            try
            {
                this.mobileService1.Open(CacheOpenMode.Create);
                this.mobileService1.GetFeatureDataAsync(map1 false null);

            }
            catch (Exception ee)
            {
                MessageBox.Show(“不能“ + ee);
            }
        }

        private void menuItem10_Click(object sender EventArgs e)
        {

            //设置地图的事件
            map1.CurrentMapAction = addVertexSketchTool1;
            //判断 Valve Inspections 这个图层是否是可编辑的。

            Featurelayer editlayer = mobileService1.layers[1] as Featurelayer;

            if (editlayer == null)
            {
                throw new NullReferenceException(“Could not find the specified feature layer“);
            }
            GeometryType geometryType = editlayer.GeometryType;
            SketchGraphiclayer sketchGraphiclayer = (map1.MapGraphiclayers[0]) as SketchGraphiclayer;

            // 根据图层的几何类型创建新的要素
   

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-09-16 10:40  SmartDeviceProject2\
     目录           0  2012-09-05 15:09  SmartDeviceProject2\bin\
     目录           0  2012-09-05 21:03  SmartDeviceProject2\bin\Debug\
     文件      459776  2008-05-19 21:48  SmartDeviceProject2\bin\Debug\ESRI.ArcGIS.Mobile.dll
     文件      918987  2008-05-19 21:53  SmartDeviceProject2\bin\Debug\ESRI.ArcGIS.Mobile.xml
     文件        5880  2007-02-20 16:56  SmartDeviceProject2\bin\Debug\Microsoft.WindowsMobile.dll
     文件        4482  2007-02-20 16:56  SmartDeviceProject2\bin\Debug\Microsoft.WindowsMobile.xml
     文件       19968  2012-09-16 09:37  SmartDeviceProject2\bin\Debug\SmartDeviceProject2.exe
     文件       34304  2012-09-16 09:37  SmartDeviceProject2\bin\Debug\SmartDeviceProject2.pdb
     目录           0  2012-09-05 20:54  SmartDeviceProject2\bin\Debug\zh-CHS\
     文件      600997  2012-09-05 10:46  SmartDeviceProject2\ESRI.ArcGIS.Client.Toolkit.Design.dll.exe
     文件       17659  2012-09-16 09:45  SmartDeviceProject2\Form2.cs
     文件       18396  2012-09-15 21:06  SmartDeviceProject2\Form2.Designer.cs
     文件        6924  2012-09-15 21:06  SmartDeviceProject2\Form2.resx
     目录           0  2012-09-03 10:15  SmartDeviceProject2\obj\
     目录           0  2012-09-15 21:06  SmartDeviceProject2\obj\Debug\
     目录           0  2012-09-05 16:18  SmartDeviceProject2\obj\Debug\Refactor\
     文件       14317  2012-09-07 20:25  SmartDeviceProject2\obj\Debug\ResolveAssemblyReference.cache
     文件        1242  2012-09-15 09:38  SmartDeviceProject2\obj\Debug\SmartDeviceProject2.csproj.FileListAbsolute.txt
     文件        1031  2012-09-15 21:06  SmartDeviceProject2\obj\Debug\SmartDeviceProject2.csproj.GenerateResource.Cache
     文件       19968  2012-09-16 09:37  SmartDeviceProject2\obj\Debug\SmartDeviceProject2.exe
     文件         180  2012-09-15 21:06  SmartDeviceProject2\obj\Debug\SmartDeviceProject2.Form2.resources
     文件       34304  2012-09-16 09:37  SmartDeviceProject2\obj\Debug\SmartDeviceProject2.pdb
     文件         180  2012-09-15 09:26  SmartDeviceProject2\obj\Debug\SmartDeviceProject2.Properties.Resources.resources
     目录           0  2012-09-03 10:15  SmartDeviceProject2\obj\Debug\TempPE\
     文件         366  2012-09-14 11:19  SmartDeviceProject2\Program.cs
     目录           0  2012-09-03 10:15  SmartDeviceProject2\Properties\
     文件        1471  2012-09-03 10:15  SmartDeviceProject2\Properties\AssemblyInfo.cs
     文件        2375  2012-09-03 10:15  SmartDeviceProject2\Properties\Resources.Designer.cs
     文件        5618  2012-09-03 10:15  SmartDeviceProject2\Properties\Resources.resx
     文件        4389  2012-09-14 11:26  SmartDeviceProject2\SmartDeviceProject2.csproj
............此处省略2个文件信息

评论

共有 条评论