|
名称
|
数据类型
|
说明
|
|
ErrorCode
|
int
|
该类中形成的错误信息
|
|
LintPtCount
|
int
|
管线点的总数
|
|
mapZoomFull
|
MapObjects2.Rectange
|
图层缩放处理
|
|
Message
|
string
|
消息(包括错误信息)
|
|
Model
|
global.Model
|
当前模式
|
|
objMap
|
AxMapObjects2.AxMap
|
地图控件对象
|
|
PointCount
|
int
|
高程点总数
|
|
名称
|
参数
|
返回值
|
说明
|
|
CMapControl
|
|
|
构造函数
|
|
CMapControl
|
AxMapObjects2.AxMap
|
|
重载构造函数
|
|
AddLayerFromFolder
|
string,string
|
bool
|
加载数据库文件
|
|
AddLine
|
MapObjects2.Point
|
|
添加线对象
|
|
AddPoint
|
MapObjects2.Point
|
|
添加点对象
|
|
BasePoint
|
MapObjects2.Point,global.Model
|
|
地图基本处理
|
|
getZ
|
ptZD2,MapObjects2.Point
|
MapObjects2.Point
|
计算点的高程
|
|
GetCross
|
|
MapObjects2.Point
|
两直线的交点
|
|
LocationRect
|
MapObjects2.Point
|
MapObjects2.Point
|
计算最短距离
|
|
ptProcess
|
MapObjects2.Point
|
|
对点进行处理
|
|
ZoomChange
|
int
|
|
放大、缩小处理
|
public bool AddLayerFormFolder(string DbFolderName,string LayerName)
{
bool DbConn=false;
MapObjects2.DataConnection mapDataConnection;
mapDataConnection =new MapObjects2.DataConnectionClass();
MapObjects2.MapLayer mapLayer=new MapObjects2.MapLayerClass();
MapObjects2.Symbol mapSymbol=new MapObjects2.SymbolClass();
try
{
mapDataConnection.Database=DbFolderName;
DbConn=mapDataConnection.Connect();
if(!DbConn)
{
this._msg+="/n连接到地图数据库 "+DbFolderName+" 时,发生错误!";
return false;
}else{
mapLayer.GeoDataset=mapDataConnection.FindGeoDataset(LayerName);
mapSymbol.CharacterIndex=1;
mapSymbol.Color=(uint) MapObjects2.ColorConstants.moGreen;
mapLayer.Symbol=mapSymbol;
this._map.Layers.Add(mapLayer);
this._map.Refresh();
return true;
}
}
catch
{
this._msg+="/n未发现 "+ LayerName +" 的层!";
return false;
}
finally
{
mapDataConnection.Disconnect();
}
}
|
public void BaseProcess(MapObjects2.Point point,global.Model gloModel)
{
this._model=gloModel;
switch(gloModel)
{
case (global.Model.ZoomIn): //图像放大
MapObjects2.Rectangle inRect=_map.TrackRectangle();
if(inRect==null || inRect.Width<0.00005 || inRect.Height<0.00005)
{
inRect=this._map.Extent;
inRect.ScaleRectangle(0.6667);
inRect.Offset(-(inRect.Center.X-point.X),-(inRect.Center.Y-point.Y));
}
_map.Extent=inRect;
break;
case(global.Model.ZoomOut): //缩小图像
MapObjects2.Rectangle rect=_map.TrackRectangle();
if(rect==null || rect.Width<0.0005 || rect.Height<0.0005)
{
rect=_map.Extent;
rect.ScaleRectangle(1.5);
rect.Offset(-(rect.Center.X-point.X),-(rect.Center.Y-point.Y));
}
else
{
double _times=_map.Extent.Width/rect.Width;
rect.ScaleRectangle(_times);
}
_map.Extent=rect;
break;
case(global.Model.Pan): //移动图像
this._map.MousePointer=MapObjects2.MousePointerConstants.moPanning;
this._map.Pan();
this._map.MousePointer=MapObjects2.MousePointerConstants.moPan;
break;
case(global.Model.AddPoint):
CDbProcess DbProc=new CDbProcess(); //新的类操作对象
DbProc.m_Dg=this.m_Dg;
DbProc.AddPointToDg(point); this.AddPoint(point,0,global.Model.AddPoint);
break;
case(global.Model.AddLine):
this.AddLine(point);
break;
default:
break;
}
}
|
|
名称
|
数据类型
|
说明
|
|
m_ClickID
|
int
|
当前点击的ID
|
|
m_Dg
|
Datagrid
|
存储数据的DataGrid对象
|
|
m_Model
|
global.Model
|
当前模式
|
|
Message
|
string
|
消息(包括错误信息)
|
|
名称
|
参数
|
返回值
|
说明
|
|
CDbProcess
|
|
|
构造函数
|
|
AddPointToDg
|
MapObjects2.Point
|
|
添加点数据至控件
|
|
AddPointToDg
|
MapObjects2.Point,int
|
bool
|
添加点数据至控件
|
|
FillPointData
|
DataGrid
|
|
初始化数据控件
|
|
Initialization
|
|
|
初始化变量
|
|
LocationRect
|
MapObjects2.Point
|
MapObjects2.Point
|
计算最短距离
|
|
ShowErrorMessage
|
|
|
显示该类的错误信息
|
497




被折叠的 条评论
为什么被折叠?



