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.