C # Develop GIS Application Concise Tutorial (1)

xiaoxiao2021-03-05  20

C # Develop GIS Application Concise Tutorial

First preparation

Using C # development GIS applications, you should first install Visual Studio .NET in the system (recommended to use 2003 versions), then you need to install MapX 5.0. Some features that may not be implemented in this tutorial.

In addition, you should also collect all information about .NET, C # and Mapx as much as possible, tutorial is very practical, dedicated to technical issues, not to list information, so it is best to have some ignitations on hand. If it is If you can't find it, you can understand the help of msdn.met and mapx.

There are many tutorials about .NET installation, there are no more details.

MapX 5.0 is easy to install, follow the prompts to install, and the general software installation has no difference. After installing the control, don't forget the map data attached to the same.

After installing the above software, you need to add Mapx 5.0 controls in the .NET programming environment.

Create a new WINDEOSAPPLICATION project in the .NET programming environment, then select "Project / Add Reference" in the menu, open the window as shown below, select the COM tab in the window, double-click MapInfo Mapx V5 in the Component Name list . Click the "Confirm" button to add the MAP5 control into the .NET toolbox.

Now, all preparations have been completed, in order to test whether the installation is correct, we make a simple map to enlarge the program.

In the project just opened, select the MapInfo Mapx V5 control from the toolbar to draw it to the Form1 window in the project, as shown below:

Add a Button control button1, change its text attribute to "zoom", as shown below:

Double-click the button in the design window and write the code as follows:

Private void button1_click (Object sender, system.eventargs e) {axmap1.currenttool = mapxlib.toolconstants.mizoomintool;

Compile, run the program. If there is no error, the preparation work has been completed.

Exercise:

1. Complete the application, enlarge, reduce, and roam function in the window.

2. Familiar with the Geoset Manager program in MapInfo Mapx.

3. Understand the knowledge of GIS. (Recommended to "Programmer Resources Big Alliance" website to view the contents of the relevant section.

转载请注明原文地址:https://www.9cbs.com/read-36279.html

New Post(0)