Development and instance of the Arcgis server series ADF

Source: Internet
Author: User

Transferred from: http://www.cnblogs.com/tony111082/archive/2006/10/18/532335.html

Http://www.cnblogs.com/GIS_zhou/articles/1576933.html

In the ArcGIS server learning process, perhaps the first thing you will use is the initial server development with your own ADF. In general, The ADF is a powerful Web server-side control. It encapsulates a lot of code and client operations for us. This reduces the difficulty of our development. However, since I am using ArcGIS Server9.0. There are problems with the ADF that comes with it, resulting in some problems with the project being developed, These problems often result in the failure and regret of the whole project. At the end of this article, I will point out the shortcomings of the ADF I have encountered.
First, we need to install an ADF installation package. The installation process is simple. Here is not the explanation.
Once installed, it will automatically create templates in Visual Studio, with maps, thematic maps, buffered queries, Web service, and so on. Here, I'll just cite one as an example. Because I personally recommend not using ADF development.
Development steps for ADF:
1. Create a new project from the template. (or create a new project yourself, drag the Mapcontrol object into the page).
2. Set some basic properties in the Mapcontorl object and some related objects, such as Host,serverobjcet.
3. Set the user in the impersonation object so that you have access to the page. (There is also a way to set the webconfig inside the <identity impersonate= "true" username= "xxx" password= "xxx"/> can also resolve permissions issues.)
4. Develop the appropriate functions.

Here's a buffer query template as an example, because buffer queries are definitely used in every GIS project, and there are some relatively few areas to note.
The template is used as follows (just configure Host,serverobject,impersonate to form the following interface):
This template implementation is to select one of the features in a layer and then buffer the features of any one layer based on that feature. By this example, I will explain some of the basic classes and interfaces in the AO. and for their general purpose. You can refer to the template for specific use, Future articles will be introduced in succession.
Serverconnection: Used to connect to an ArcGIS server server.
Imapserver: Develop one of the most frequently used interfaces in an ArcGIS server project. Used to encapsulate server objects. Some queries, compute distances and scale bars are all under the interface.
Iservercontext: Server context object. It needs to be used to create an AO object. Use Webobject to manage its life cycle.
Imapdescription: The state of the map. Because ArcGIS server is stateless. When we need to save the state it is just to save it in the session. In addition, it represents the information of the mxd configured in ArcMap.
Iimagedisplay: Describes the size and resolution of the map.
Imapextent: Describes the extent of the map. There are 3 ways to zoom in and out of a map, one of which is to use that interface.
Imapserverinfo: Some basic information about the map service. Save range, units, etc.
Ienvelope: A rectangular region. Each spatial feature has a rectangular area around it.
Idslist: A data structure that holds the shaping data. This is used to preserve the FID. Note that if you are accessing the shape file, then the FID is the default spatial primary key for the GIS. automatically grows from 0. If you are accessing an Oracle space library, it becomes objectid. automatically grows from 1.
Ifidset:: Save FID list.
Ifeatureextent: The scope of a spatial feature. The range of polygons and segments is very good to judge, the point is very troublesome. Generally when positioning to a spatial feature, if it is a polygon or a line segment, the current map extent is set directly to the range of the feature. If it is a point, you need to enter the range manually .
Ifields: Field information.
IFeature: Information about a spatial element.
Ilayerdescription: The information for the layer. This layer information refers to the layer information that is configured in ArcMap. Not a physical layer. Remember!
Igeometry: Represents a Spatial object.
Ispatialfilter: Spatial query interface. For example, querying an entity within a range uses this interface.
Iqueryfilter: Query interface. General correspondence attribute query.
Irgbcolor: Interface for managing colors in AO. You can convert from the converter class to the. NET Color class.
Irecordset: Data set in AO. You can also convert from a dataset in the converter class and. Net.

After the above description, I believe you see the code will be much clearer. If there is anything that you do not understand, you can ask me directly. Here I will not list the code to explain. Because using ADF development is simple. A bit of a hassle is if you use AO objects for functional combinations.

Why at first I don't recommend using ADF for development because, one. ADF is full-screen refresh and does not support the current popular Ajax. Two, because of the ADF encapsulation, there are some problems in putting Mapcontrol on some interface elements. Three, The ADF has little controllability. It's all packaged code. Some effects are not as convenient as their own implementations.

In the following article, I'll show you how to discard the ADF and use the AO object directly to develop an ArcGIS server app.

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.