Loading of MAP data
1. Loading the map document
ArcGIS engine supports loading multiple types of data, Coverage with vector data, shapefiles, dwg/dxf files, BMP for raster data, grid, control database, and so on. In many cases, it is most appropriate to load a map document made from ArcGIS Desktop (*.mxd format).
The third way to load a map:
- Loaded using the Loadmxfile method of the Imapcontrol interface.
- Loaded via the Imapdocument interface.
- Controlsopendoccommandclass loaded using the Encapsulated Class Library resource in ArcGIS engine.
1. Loading the map document using the Loadmxfile method of the Imapcontrol interface
Ideas are as follows:
- Pass. The NET Framework class provides an open file dialog box that selects the map document to open.
- Use the Checkmxfile method provided by the Imapcontrol interface to check for valid map data and, if valid, invoke the Loadmxfile method provided by the Imapcontrol interface to load.
- Checkmxfile method: The function of this method is to determine whether the selected map document is a valid graphic file that can be recorded in the Mapcontrol control. It verifies that the file exists and that the internal structure of the file conforms to the intended storage format.
- Loadmxfile method: The function of this method is to load the map document in the Mapcontrol control, and the map document can be indicated by an index or file name. The function prototype is public void Loadmxfile (string mxpath,object mapnameorindex,object password).
- Description of the Parameters table:
Parameters |
Describe |
Mxpath |
Select a string expression that represents the path to the file |
Mapnameorindex |
Optional, indicating map name or index number |
Password |
Optional, indicates a password |
Maps for the development of the ArcGIS Engine basic operations (2)