MapObjects2.2 在C#中的应用(动态加载地图)

毕业设计——第二章 系统总体设计(1) 第一章     系统总体设计如前所述,“排水GIS地理信息系统”属于专业系统,与公众系统相比而言,公众GIS系统用户友好性是关键,而专业系统注重是专业只是的系统体现。专业系统设计时,必须考虑使用者的心理。比如:(1)操作简单。虽说是专业软件,但是主要使用对象是非计算机专业的人员操作,所以必须考虑软件的操作简洁、方便,并具有一定的趣味性,使用户对该系统有信心和兴趣;(2)在GIS原理和功能表达上 阅读详情

MapObjects2.2 在C#中的应用(动态加载地图)

 

关键字:MapObjects 2.2 C#

 

本篇文章实现了动态加载地图的功能,废话少说,功能实现见代码。

 

 

加载过程代码:

 

using System;

using System.Drawing;

using System.Collections;

using System.ComponentModel;

using System.Windows.Forms;

using System.Data;

 

namespace LoadMap

{

     /// <summary>

     /// Form1 的摘要说明。

     /// </summary>

     public class Form1 : System.Windows.Forms.Form

     {

          private AxMapObjects2.AxMap axMap1;

         /// <summary>

         /// 必需的设计器变量。

         /// </summary>

          private System.ComponentModel.Container components = null;

 

         public Form1()

         {

              //

              // Windows 窗体设计器支持所必需的

              //

              InitializeComponent();

 

              //

              // TODO: 在 InitializeComponent 调用后添加任何构造函数代码

              //

         }

 

         /// <summary>

         /// 清理所有正在使用的资源。

         /// </summary>

          protected override void Dispose( bool disposing )

         {

              if( disposing )

              {

                   if (components != null)

                   {

                        components.Dispose();

                   }

              }

              base.Dispose( disposing );

         }

 

          #region Windows 窗体设计器生成的代码

         /// <summary>

         /// 设计器支持所需的方法 - 不要使用代码编辑器修改

         /// 此方法的内容。

         /// </summary>

          private void InitializeComponent()

         {

              System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));

              this.axMap1 = new AxMapObjects2.AxMap();

              ((System.ComponentModel.ISupportInitialize)(this.axMap1)).BeginInit();

              this.SuspendLayout();

              //

              // axMap1

              //

              this.axMap1.Dock = System.Windows.Forms.DockStyle.Fill;

              this.axMap1.Location = new System.Drawing.Point(0, 0);

              this.axMap1.Name = "axMap1";

              this.axMap1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axMap1.OcxState")));

              this.axMap1.Size = new System.Drawing.Size(600, 357);

              this.axMap1.TabIndex = 0;

              //

              // Form1

              //

              this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);

              this.ClientSize = new System.Drawing.Size(600, 357);

              this.Controls.Add(this.axMap1);

              this.Name = "Form1";

              this.Text = "Form1";

              this.Load += new System.EventHandler(this.Form1_Load);

              ((System.ComponentModel.ISupportInitialize)(this.axMap1)).EndInit();

              this.ResumeLayout(false);

 

         }

          #endregion

 

         /// <summary>

         /// 应用程序的主入口点。

         /// </summary>

          [STAThread]

         static void Main()

         {

              Application.Run(new Form1());

         }

 

          private void Form1_Load(object sender, System.EventArgs e)

         {

              //定义数据连接

              MapObjects2.DataConnection dc = new MapObjects2.DataConnectionClass();

              //定义图层

              MapObjects2.MapLayer layer = new MapObjects2.MapLayerClass();

              //我的地图文件都存在了"G://LoadMap//bin//Debug//"目录下,请替换为自己的地图目录

              dc.Database = "G://LoadMap//bin//Debug//";

              //连接不成功就退出

              if(!dc.Connect())

              {

                   MessageBox.Show("在指定的文件夹下没找到图层数据文件");

                   Application.Exit();

              }

              else//连接成功了就加载地图

              {

                   /*

                    * 地图加载顺序一般是面、线、点,先加载的在地图的最下

                    */

                   //加载图层States,

                   layer.GeoDataset = dc.FindGeoDataset("States");

                   axMap1.Layers.Add(layer);

                   //加载图层Rivers,

                   layer.GeoDataset = dc.FindGeoDataset("Rivers");

                   axMap1.Layers.Add(layer);

                   //加载其它图层...

              }

              //必须进行刷新后才能显示

              axMap1.Refresh();

         }

     }

}

 

 

C# 地图显示缩放 坐标系动态显示 多级地图显示 C# 地图显示缩放 坐标系动态显示 多级地图显示。 关于在窗口中显示地图,并用坐标系动态描述多级地图显示 C# 坐标轴 立即下载

相关推荐

MapObjects 2.2

MapObjects 2.2 插件 MapObjects 2.2 插件MapObjects 2.2 插件MapObjects 2.2 插件MapObjects 2.2 插件

MapObjects2中加载瓦片地图的相关内容(C#)

在使用MapObjects2显示瓦片地图时,可以用一下代码通过MapObjects可以显示瓦片地图(ImageCatalog),瓦片地图信息保存在一个数据库表中,其格式为Image Stringxmin  地图左下角x坐标ymin  地图左下角y坐标xmax  地图左上角x坐标ymax  地图左上角y坐标我采用的是在Access数据库保存地图位置信息(我试过 Sql Server,但是以失败告终,不知道是不支持Sql Server,还是我的t.Database写错了,如果有人知道,请不吝赐教)数据库名称为m

jeff's blog 3115

C#Map地图文件加载

用c#语言编写的代码,把矢量文件加载在picbox上

在C#中应用MapObjects(转换坐标系)

在C#中应用MapObjects(转换坐标系) 摘要:MapObjects C# 转换坐标系 作者:杨雨田 Blue_Bat@126.Com   我使用地图的时候比较喜欢那种经纬度带弧度的地图,就像想当年上初中地理的时候经常看到的世界地图一样,而MO默认的地图是经纬度直直的那种,经研究发现很容易转变,代码如下:   MapObjects2.ProjCoordSys csmap=ne

老杨的记录 2936

用Verilog在FPGA上做个电子琴:从矩阵键盘到蜂鸣器的完整实现(附代码)

本文详细介绍了如何使用Verilog在FPGA上实现一个完整的电子琴系统,涵盖矩阵键盘扫描、音调生成和蜂鸣器驱动等核心模块。通过模块化设计和PWM调制技术,开发者可以构建一个可交互的音乐播放器,项目代码完整且易于扩展,适合FPGA初学者和数字逻辑设计爱好者实践。

weixin_29191669的博客 405

彩票预测的可能性与算法分析

彩票作为一种以随机数为基础的赌博形式,吸引了大量希望一夜暴富的参与者。尽管许多人希望通过某种方式预测彩票结果,以增加中奖几率,但彩票预测的可能性依然是一个充满争议和误解的话题。本文将探讨彩票是否能够预测的理论依据,分析可能的预测算法,并解释这些算法为何在实际应用中难以奏效。

m0_38012434的博客 2万+

MapObjects2.2 在C#中的应用(基本地图功能)

<!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--><script type="text/javascript"

zgqtxwd的专栏 566

LVGL仪表盘实战:5分钟用lv_meter打造汽车仪表UI(附完整代码)

本文详细介绍了如何使用LVGL的lv_meter组件在5分钟内构建专业汽车仪表盘UI。从环境配置、刻度定制到指针动画和性能优化,提供完整代码示例和实战技巧,帮助开发者快速实现嵌入式设备上的高效仪表盘设计。

k5l6m的博客 440

MapObjects2自定义符号实现

<br />公司一个项目正在用MapObjects来实现基于桌面的地图操作,在地址定位时,MapObjects中提供了一些符号来表示poi,但是总是感觉不能直观的表达意思,所以就打算用图片的形式来显示一个poi,找了很多资料,终于琢磨出来,贴上来与大家共享<br /> <br /> <br />自定义标记 CustomMarker 代码如下<br /> <br />using System; using System.Collections.Generic; using System.Text; us

jeff's blog 2318

深入解析NPN与PNP传感器驱动电路的设计逻辑与实战应用

本文深入解析NPN与PNP传感器驱动电路的设计逻辑与实战应用,详细对比两者的电流路径差异和电平变化特性。通过实际案例分享电路设计要点,包括上拉电阻选择、保护二极管配置等,并提供工业应用中的选型策略和常见故障排查指南,帮助工程师优化传感器系统集成。

weixin_42561476的博客 477

别再为数据发愁:5分钟理解事件相机原理,并自己动手生成事件图像

本文深入浅出地解析了事件相机的工作原理,并提供了从静态图像生成事件数据的实用方法。通过Python代码示例,读者可以快速掌握如何模拟事件相机的输出,应用于机器人导航、自动驾驶等领域,解决数据获取难题。

weixin_31458015的博客 305

visio二次开发初始化问题

问题: axDrawingControl1初始化失败((System.ComponentModel.ISupportInitialize)(this.axDrawingControl1)).EndInit(); 没有注册类 (异常来自 HRESULT:0x80040154 (REGDB_E_CLASSNOTREG)) 解决方法: 在项目属性里设置“生成”=>“目标平台”为x86而不是默...

weixin_30858241的博客 263

STM32入门教程:水位传感器应用

这是一个简单的STM32水位检测系统的入门教程。希望通过学习本教程,您能对STM32微控制器的基本应用有更深入的了解,并能成功构建一个水位检测系统。如果您需要更详细的代码实例和教程,请参考相关的STM32开发手册和应用笔记。STM32是一款功能丰富且广泛应用于嵌入式系统的微控制器系列。在本教程中,我们将介绍如何使用STM32微控制器和水位传感器构建一个水位检测系统。

wx_linying1029的博客 536

MapObjects2.2 在C#中的应用

步骤一:   创建Windows应用程序步骤二:  拖动控件到窗体,生成的代码为:定义变量:private AxMapObjects2.AxMap axMap1;在InitializeComponent中的代码如下:this.axMap1 = new AxMapObjects2.AxMap();   //  // axMap1 //  this.axMap1.Doc

calm_agan的专栏 1289

线性代数-第24篇:线性代数在控制系统中的核心应用

线性代数通过状态空间建模、矩阵分解与优化算法,为控制系统提供了从理论分析到工程实现的完整框架。从传统PID控制到现代智能控制,其应用贯穿系统设计、分析与优化的全流程。未来,随着多智能体协同控制、量子控制系统等前沿领域的发展,线性代数将在高维矩阵计算、分布式优化等方向持续创新,为复杂控制系统的突破提供核心支撑。如果对线性代数在控制系统中的应用细节有疑问,欢迎在评论区留言!

无 429

手把手教你学PCIE(5.1)--pcie固件初始化的硬件初始化

PCIe 固件初始化的硬件初始化是一个复杂但至关重要的过程。通过正确配置 PCIe 控制器和相关硬件,可以确保系统的稳定性和性能。以上步骤和示例代码提供了一个基本的框架,实际开发中可能需要根据具体的硬件和需求进行调整和优化。

MHD0815的博客 1696

MapObject 2.1在C#中的使用

 1. 将MapObject 2.1的控件加入控件TabTools中 选择 COMComponents=>MapObjects 2.1 Map Control, 加进来后是 AxMapObject2.AxMap控件 2. 加载地图 MapObjects2.MapLayer layer; //图层MapObjects2.GeoDataset gds; // 图层对应的

gong_hui2000的专栏 4833

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

MapObject2.1在C#中的运用

1. 将MapObject 2.1的控件加入控件TabTools中   选择 COM Components=>MapObjects 2.1 Map Control, 加进来后是 AxMapObject2.AxMap控件   2. 加载地图   MapObjects2.MapLayer layer; //图层 MapObjects2.GeoDataset gds; // 图层对应的数据

a631464421的专栏 920

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

c#+mo2.3添加多个shp文件

/*   说明:C#中添加多个shp文件,默认对象为axMap1,如果名称改变,秩序修改最后一句即可   注:需要引用System.Windows.Forms、System.IO和ESRI.MapObjects2.Core;   */   /* 说明:C#中添加多个shp文件,默认对象为axMap1,如果名称改变,秩序修改最后一句即可 注:需要引用System.Window

yzlz888的专栏 819

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

mo+c#(vs2005)开发gis系统学习笔记

 正在学习用c#+mo开发gis系统,对mo开发不是很了解,而且这方面的资料也比较少,只能靠自己摸索,以下为我的学习笔记:    首先添加mo,在工具栏点右键,添加项,在组件中找到mo2.0组件,确定,在工具箱上即可添加axmap控件。    图层的添加有两种方法:    方法1.在axMap的属性窗口单击ActiveX特性,弹出单击Add...,选择地图文件,确定即可。方法2

lzqmoycool的专栏 1258

毕业设计——第三章 开发方法及系统实现(2)

 3.3 地图操作类CMapControl详述3.3.1地图操作类CMapControl 类的成员属性和方法表 3-2 CMapControl类中实现的成员属性[5] 名称 数据类型

孤剑之家 2492

开源GPS项目招募志同道合者

     我们的GPS车辆监控开源项目经过团队两个月的努力,已经基本成型了,年后希望能更加完善一下,加入一些业务方面的内容。这个项目是基于爱好而创建的,没有任何酬劳,不过能将这个项目做成商业级的水平,参与者所能获得的荣誉和附加价值不言而喻。     简单介绍下这个项目和以后的发展思路。目前项目采用C#+MapObjects平台开发,采用C/S架构,目前已经实现了下面所介绍的功能。年后的计划

lionyue的专栏 2241
上一篇: MapX使用数据库数据添加专题图(系列之三)
下一篇: 在C#中应用MapObjects(图层标注)
blue_bat
博客等级 码龄26年 17粉丝 22原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

blue_bat

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值