Development and instance of ArcGIS Server Series ADF

Source: Internet
Author: User
In the learning process of ArcGIS Server, you may be the first to use the self-built ADF for preliminary server development. in general, the ADF is a relatively powerful web server-side control. encapsulated a large number Code And client operations. this reduces the difficulty of development. however, because I use ArcGIS server9.0. its self-built ADF still has these problems, causing some problems in the developed project, these problems often lead to the failure and regret of the entire project. in this Article At the end, I will point out the defects of the ADF.
First, we need to install an ADF installation package. The installation process is very simple. It is not described here.
After the installation, it will automatically create some templates in Visual Studio, including map browsing, topic graph creation, buffer query, and Web Service. here, I will just give an example. this is because I personally recommend that you do not use the development method of ADF.
Steps for developing the ADF:
1. Create a project using the template. (or create a project by yourself and drag the mapcontrol object to the page ).
2. Set some basic attributes in the mapcontorl object and related objects, such as host and serverobjcet.
3. set the user in the impersonation object so that the user can access the page. (You can also set <identity impersonate = "true" username = "XXX" Password = "XXX"/> In webconfig to solve the permission issue .)
4. Develop relevant functions.

The buffer query template is used as an example here, because the buffer query is definitely used by every GIS project, and there are some points worth attention.
After the template is used as follows (you only need to configure host, serverobject, and impersonate to form the following interface ):
This template selects an element in a layer, and then queries the elements of any layer based on this element. through this example, I will explain some basic classes and interfaces in AO. they also provide an explanation of their general usage. you can refer to the template for specific usage.
Serverconnection: used to connect to the ArcGIS Server server.
Imapserver: One of the most frequently used interfaces in the ArcGIS Server project. It is used to encapsulate server objects. Some query, calculation distance, and scale functions are all under this interface.
Iservercontext: server context object. You need to use it to create an AO object. Use webobject to manage its lifecycle.
Imapdescription: MAP status. because ArcGIS Server is stateless. when we need to save the status, we can just save it in the session. in addition, it also represents the mxd information configured In ArcMap.
Iimagedisplay: Describes the map size and resolution.
Imapextent: Describes the MAP range. You can zoom in or out a map by using this interface.
Imapserverinfo: basic information of the map service, including the storage range and unit.
Ienvelope: a rectangular area. Each spatial element has a rectangular area around it.
Idslist: The data structure that stores the integer data. FID is saved here. note: If you access the shape file, FID is the default spatial primary key of GIS. automatic growth starts from 0. if the Oracle database is accessed, it becomes objectid. automatic growth starts from 1.
Ifidset: Save the FID list.
Ifeatureextent: the range of a spatial element. the range of the polygon and line segment is well determined, and the point is very troublesome. when positioning a spatial element, if it is a polygon or line segment, you can directly set the current map range to the range of the element. if it is a vertex, You need to manually enter the range.
Ifields: field information.
Ifeature: information of a spatial element.
Ilayerdescription: layer information. This layer information refers to the information of the layer configured In ArcMap, not the physical layer. Remember!
Igeometry: a space object.
Ispatialfilter: Space query interface. For example, this interface is used to query objects within a certain range.
Iqueryfilter: query interface. Generally, query corresponding properties.
Irgbcolor: The color management interface in AO. You can use the converter class to convert to the. NET color class.
Irecordset: dataset in AO. You can also convert it using the converter class and dataset in. net.

As described above, we believe that the Code will be much clearer. if you have any questions, please contact me directly. I will not list the code here for explanation .. this is because it is very easy to develop with the ADF. if you use AO objects for function combination.

At the beginning, I do not recommend using the ADF for development, because, 1. the ADF is a full screen refresh and does not support the popular Ajax. the interface and performance are very affected. 2. Some problems may occur when mapcontrol is placed on some interface elements due to the reason of the ADF encapsulation. III. The control of the ADF is not very high. all are encapsulated code. some results are not as convenient as they are.

In the following article, I will show you how to discard the ADF and use the AO object directly to develop the ArcGIS Server application.

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.