当前位置:网站首页>ArcEngine (2) loading the map document
ArcEngine (2) loading the map document
2022-08-03 08:02:00 【Prospector in the rice field】
Load map document with MapControl control
private void Load map documentToolStripMenuItem_Click(objectspan> sender, EventArgs e){//Open file dialogOpenFileDialog openFileDialog = new OpenFileDialog();openFileDialog.Title = "Load map document";//set titleopenFileDialog.Filter = "(*.mxd)|*.mxd";//Set filter modeif (openFileDialog.ShowDialog() ==DialogResult.OK){//Set pathstring fullPath = openFileDialog.FileName;//full path//Add layerMapControl.LoadMxFile(fullPath);//Refresh basemapMapControl.Refresh();}MessageBox.Show("File loaded successfully", "Tips", MessageBoxButtons.OK, MessageBoxIcon.Information);}