Maps for the development of the ArcGIS Engine basic operations (2)

Source: Internet
Author: User

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:

    1. Loaded using the Loadmxfile method of the Imapcontrol interface.
    2. Loaded via the Imapdocument interface.
    3. 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:

  1. Pass. The NET Framework class provides an open file dialog box that selects the map document to open.
  2. 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.
      1. 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.
      2. 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).
      3. 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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.