The relationship between the ArcIMS map configuration file, map service, and request and response)

Source: Internet
Author: User
This article not only discusses the relationship between map configuration files, map services, requests and responses, but also describes how they interact with the ArcIMS space server. ArcIMS space server is the pillar of ArcIMS. The space server can package the map and data in the appropriate format and then send it to the client browser. All communication with the space server uses ArcXML. Figure 1 shows the relationship between the space server and the map configuration file, the map service, and the request and response. The numbers in the chart reflect different steps for communication with the space server. Step 2: Use the author tool, text editor, or XML editor to create a map configuration file. The map configuration file is written in ArcXML. Step 2: Use the Administrator to publish a map service on the spatial server. The map configuration file generated in step 2 is for this map service. Step 2: The space server receives a request in ArcXML format. Step 2: The space server generates an ArcXML response.

Figure 1 shows the relationship between the map configuration file, map service, ArcIMS space server, and request and response according to the chartEach of the above steps will be discussed in detail below. Step 2: create a map configuration file in step 1 of Figure 1 and generate a map configuration file. You can use the author tool, text editor, or XML editor to create a map configuration file, this file is in ArcXML format and contains the map description, such as what data layer is used and how each layer is displayed. Figure 2 shows that ArcIMS author has two layers: us_cities layer and states_dd layer.
Image 2 when you save the file in author, the result is a map configuration file containing layer information, as shown in figure 3. <? XML version = "1.0" encoding = "UTF-8"?>
& Lt; ArcXML version = "1.1" & gt;
<Config>
<Environment>
<Locale Country = "cn" Language = "ZH" variant = ""/>
<Uifont color = "0, 0" name = "sansserif. Plain" size = "12" style = "regular"/>
<Screen DPI = "96"/>
</Environment>
<Map>
<Properties>
<Envelope Minx = "-128.86515248134154" miny = "18.924781799316406" Maxx = "-66.96927103600244" Maxy = "58.38488352301343" name = "initial_extent"/>
<Mapunits Units = "decimal_degrees"/>
</Properties>
<Workspaces>
<Shapeworkspace name = "shp_ws-0" directory = "C: \ student \ ArcIMS \ data"/>
</Workspaces>
<Layer type = "featureclass" name = "states_dd" visible = "true" id = "0">
<Dataset name = "states_dd" type = "polygon" workspace = "shp_ws-0"/>
<Simplerenderer>
<Simplepolygonsymbol boundarytransparency = "1.0" filltransparency = "1.0" fillcolor = "255," boundarycaptype = "round"/>
</Simplerenderer>
</Layer>
<Layer type = "featureclass" name = "us_cities" visible = "true" id = "1">
<Dataset name = "us_cities" type = "point" workspace = "shp_ws-0"/>
<Simplerenderer>
<Simplemarkersymbol color = "255, 0" width = "6"/>
</Simplerenderer>
</Layer>
</Map>
</Config>
</ArcXML>
The map configuration file distinguishes the request or response flag from the config element. Sub-elements of the config element are used to help define map features, such as properties, workspace, and layer.
Procedure 2 : Publish a map serviceThe map service is an application running on the ArcIMS space server. You can view the map service as an entry to the space server. The space server only provides corresponding services for the map service running on it. For a map service, a map configuration file is necessary (step 1 in Figure 1 ). When publishing a map service, you must assign the map service to featureserver or imageserver. The example in this article is to publish the service as an image map service. In either case, the map configuration file provides the drawing rules for each layer in the map service. These rules are the default options of the map service. For example, if the map service uses the map configuration file shown in figure 3, the map service will fill the states_dd layer with blue polygon and the us_cities layer with red markers. Step 2: the client sends a request to the map service. Once the map service runs on the space server, the client can send a request to the map service (step 1 in Figure 1 ). Requests are generated by the ArcIMS HTML client browser, Java client browser, ColdFusion, and ActiveX connector. The difference between client requests and other types of ArcXML files is the request element. Figure 4 is a typical example of client requests. Figure 4: client request image example<? XML version = "1.0" encoding = "UTF-8"?> <ArcXML version = "1.1"> <request> <get_image> <Properties> <envelope Minx = "-125" miny = "25" Maxx = "-67" Maxy = "50 "/> <imagesize width =" 700 "Height =" 500 "/> </Properties> </get_image> </request> </ArcXML> when the preceding request is sent to Figure 3 map Service, the result looks the same as the initial map defined in author. The map service is used to define the range and layer symbol. Figure 5: Map Service generated using the default value of the map service
Image 3 client requests can also request different scales to change the color of the layer, display or hide the layer, and request a subset of attribute data or change the projection to overwrite some information of the map service. Figure 6: the client sends a request to the same map service, obtains the new scaling ratio, changes the element symbol of the us_cities layer to a star, and changes the color from blue to green. Figure 6: the client requests to change the symbols and colors of the zoom area and layer elements of the map service.<? XML version = "1.0" encoding = "UTF-8"?> <ArcXML version = "1.1"> <request> <get_image> <Properties> <envelope Minx = "-88" miny = "30" Maxx = "-67" Maxy = "50.0 "/> <imagesize width =" 500 "Height =" 350 "/> <layerlist> <layerdef id =" 1 "visible =" true "> <simplerenderer> <simplemarkersymbol type = "Star" color = "0,255, 0 "width =" 6 "/> </simplerenderer> </layerdef> </layerlist> </Properties> </get_image> </request> </ArcXML> client request to obtain new map, show 7: Figure 7: use the new zoom factor and change the symbol and display color for the us_cities Layer  
Image 4
Step 2: the client accepts the server response. When the space server processes a request, the result is a response (step 1 in Figure 1 ). The difference between the server response and other types of ArcXML files is the response element. Figure 8 shows an example of how the image map service responds to a map request. The response contains the name and location of the map generated by the Space server. The response is a typical example of a request in Figure 4 and figure 6. Figure 8 : Response example<? XML version = "1.0" encoding = "utf8"?> <ArcXML version = "1.1"> <response> <image> <envelope Minx = "-91.7857142857143" miny = "30" Maxx = "-63.2142857142857" Maxy = "50"/> <output url = "http: // technic/output/actc_zhuanghy1208107213.jpg "/> </image> </response> </ArcXML>

Image 1

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.