- 积分
- 215
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-2-22
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
mapframe1.MapView = mapView1;
mapframe1.Active = true;
G_LayerLegend.MapFrames.Add(mapframe1);
this.splitContainer1.Panel1.Controls.Add(G_LayerLegend);
G_LayerLegend.Dock = DockStyle.Fill;
mapView1.Dock = DockStyle.Fill;
TabPage TabPageonehour = new TabPage();
TabPageonehour.Name = "TabPageqyz";
this.tabControl1.TabPages.Add(TabPageonehour);
tabControl1.SelectedTab = TabPageonehour;
tabControl1.SelectedTab.Controls.Add(mapView1);
//Open default project file
string aFile = Application.StartupPath + "\\rainlayers.mip";
if (File.Exists(aFile))
{
m_ProjectFilePicM.LoadProjFile(aFile);
}
//Set window size
this.Width = 1200;
this.Height = 900;
mapView1.LockViewUpdate = false;
G_LayerLegend.MapFrames[0].MapView.MaskOut.MaskLayer = "卢氏县";
G_LayerLegend.MapFrames[0].Text = "地图图层";
G_LayerLegend.Refresh();
mapview1的地图能加载但是G_LayerLegend里面的图层不能对应显示。
m_ProjectFilePicM.LoadProjFile(aFile);
函数如下:
m_FileName = aFile;
XmlDocument doc = new XmlDocument();
doc.Load(aFile);
XmlElement root = doc.DocumentElement;
//Load elements
frmain.G_LayerLegend.ActiveMapFrame.MapView.LockViewUpdate = true;
//Load MapView content
frmain.G_LayerLegend.ActiveMapFrame.MapView.ImportProjectXML(r
oot);
frmain.G_LayerLegend.ActiveMapFrame.MapView.LockViewUpdate = false;
frmain.G_LayerLegend.ActiveMapFrame.MapView.PaintLayers();
这是由于什么原因造成的?
|
|