ArcIMS learning-HTML viewer custom note continuation 3 (3. Request & response)

Source: Internet
Author: User

Request
I. basic functions:
Sendtoserver --> htmlsendtoserver
Submit Form postform
(Aimsxml. JS)
Parameters:
Urlstring
Xmlrequest request ArcXML
The value of thetype xmlmode. The default value is 1, get_image.
Sendtoserver assigns thetype to xmlmode and then calls htmlsendtoserver to submit the form.

2. get_service_info
Constructed by getstartextent () and calls sendtoserver (imsurl, thestring, 3); (aimscommon. JS)
The call relationship is as follows:
After viewer.htm is installed on all frames, onload a doit () --> checkparams --> startmap --> startup --> getstartextent
(Startmap, startup, and getstartextent are all in aimscommon. JS)

3. get_image
The first get_image is called in the response to get_service_info (Case 3 );
Sendmapxml ()
Writexml () to construct the ArcXML of the map

response
1. Basic response processing functions:
aimsxml. in JS:
processxml (xmlresponse) Processes related response according to xmlmode
function processxml (thereplyin) {
...
switch (xmlmode) {
case 1: // get the map get_image
...
default: // xmlmode> = 1000 for custom processing
If (xmlmode> = 1000) {
usecustomfunction (thereply );
}else {
alert (thereply + msglist [19]);
}< BR >}

II,
Case 3: get_service_info
Save the maximum value of the retrieved map and call processstartextent (thereply) (aimscommon. JS)
--> Sendmapxml (){
Writexml ();
Sendtoserver (, 1 );
}
Iii. user customization:
In processxml, when the xmlmode is greater than 1000, the processing is customized for the user:
Default: // xmlmode> = 1000 for custom processing
// Send any responses to custom requests off to the Custom Handler
// Xmlmode & gt; = 1000 are reserved for custom requests/responses
If (xmlmode> = 1000 ){
Usecustomfunction (thereply );
Usecustomfunction (thereply) in aimscustom. js
 
The received servlet is com. ESRI. esrimap. esrimap.

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.