资源简介
用了多种方法,实现了在地图上定时移动某点(可以代表一辆汽车)的方法,有IElement方法,也有内存图层方法.
代码片段和文件信息
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.Carto;
using ESRI.ArcGIS.Controls;
using ESRI.ArcGIS.Display;
using ESRI.ArcGIS.Geometry;
using ESRI.ArcGIS.MapControl;
using ESRI.ArcGIS.ToolbarControl;
using ESRI.ArcGIS.SystemUI;
using ESRI.ArcGIS.Output;
using ESRI.ArcGIS.esriSystem;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.DataSourcesGDB;
namespace VehicleMove
{
public partial class frmMain : Form
{
double dx = 116.315691;
double dy = 39.991964;
IActiveView pactiveview;
public frmMain()
{
InitializeComponent();
//
timer1.Enabled = false;
timer2.Enabled = false;
timer3.Enabled = false;
timer4.Enabled = false;
timer5.Enabled = false;
//
this.axToolbarControl1.SetBuddyControl(this.axMapControl1);
pactiveview = this.axMapControl1.ActiveView;
}
//方法1:缺点:有拖尾除非每次刷新,但是刷新会出现不停闪烁
private void timer1_Tick(object sender EventArgs e)
{
dx = dx + 0.001;
dy = dy - 0.0001;
MoveCar();
}
private void MoveCar()
{
//得到当前活动范围
IActiveView pActiveView = axMapControl1.ActiveView;
//开始画笔
pActiveView.ScreenDisplay.StartDrawing(pActiveView.ScreenDisplay.hDC (short)esriScreenCache.esriNoScreenCache);
IPoint ppoint;
IGeometry pgeo;
IPictureMarkerSymbol psymbol = new PictureMarkerSymbolClass();
IRgbColor prgbcolor = new RgbColorClass();
prgbcolor.Red = 0;
prgbcolor.Green = 0;
prgbcolor.Blue = 0;
psymbol.BitmapTransparencyColor = prgbcolor;
psymbol.CreateMarkerSymbolFromFile(esriIPictureType.esriIPictureBitmap@“E:\layers\2.bmp“);
psymbol.Size = 15;
psymbol.Angle = 270;
//ISimpleMarkerSymbol psimplesymbol = new SimpleMarkerSymbolClass();
//psimplesymbol.Size = 10;
//psimplesymbol.Color = (IColor)prgbcolor;
ppoint = new PointClass();
ppoint.PutCoords(dxdy);
pgeo = ppoint;
pActiveView.ScreenDisplay.SetSymbol((ISymbol)psymbol);
pActiveView.ScreenDisplay.DrawPoint(ppoint);
//结束画笔
pActiveView.ScreenDisplay.UpdateWindow();
pActiveView.ScreenDisplay.FinishDrawing();
//System.object obj = psymbol;
//this.axMapControl1.DrawShape(pgeo ref obj);
//this.axMapControl1.CenterAt(ppoint);
IEnvelope penv = this.axMapControl1.Extent;
penv.CenterAt(ppoint);
this.axMapControl1.Extent = penv;
}
pr
相关资源
- ArcEngine+C#统计图表柱状图,饼状图
- 基于C#+AE开发 公路灾害信息查询GIS系
- 各种基于Arcengine的利用c#实现的功能:
- c# arcengine 汽车在地图上移动的源代码
- vs2010c#的arcengine按属性选择,并把选择
- vs2010c#开发arcengine实现按属性选择和按
- 取消arcengine工具条中选择项命令
- ArcGlobeDemo
- c#+arcengine二次开发调用在线的天地图
- C#+ArcEngine10.0实现要素编辑之移动要素
- dwg2shp cad格式转shp格式
- AE-OpenTalbe C#和ArcEngine 编译的小程序
- KrigeInterpolation 用arcengine9.2+c#实现了克
- FeatureEdit
- ArcEngineGIS 基于ArcEngine的三维GIS演示系
- Draw165129
- SceneVisulization 类似office2007的界面风格
- VISUAL-CSharp-ARCENGINE 一个很详细的GIS开
- Arcgis ArcEngine开发的三维系统
- Symbol ArcEngine矢量图层符号化示例
- test6 arcengine做的专题图功能
- C#+ArcGEngine:Shp矢量点转Tin
- 基于VC#和AE(ARCENGINE)开发的综合地理
- c# arcengine 二次开发 查询系统
- 直接聚类法进行点的聚类
- 基于C#与ArcEngine的栅格插值方法
- ArcEngine插值方法,C#开发案例文件
- Arcengine连接数据库
-
webmapla
yer - C#不用ArcEngine,生成Shp文件 源码
评论
共有 条评论