ArcIMS学习之 定制HTML VIEWER笔记(2)

2008-02-23 07:47:27来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折


ScaleBarbackColor, ScaleBarFont, ScaleBarStyle, ScaleBarColor, MapUnits, scalebarFontColor,
ScaleBarUnits, ScaleBarPrecision, ScaleBarSize, ScaleBarWidth, drawModeOnMap, modeBlurb,
modeMapColor, and modeMapGlow and LayerVisible, LayerID, clickPointX, and clickPointY arrays.
Calls: addSpecialRenderToMap in aimsClassRender.js (custom sample); addBufferToMap in aimsBuffer.js;
addLegendToMap in aimsLegend.js; addCustomToMap1, addCustomToMap2, addCustomToMap3,
and addCustomToMap4 in aimsCustom.js; addSelectToMap in aimsSelect.js; and getScaleBarDistance
in aimsMap.js.

Called by: clickAddPoint, resetClick, and deleteClick in aimsClick.js; getLegend in
aimsLegend.js; getPrintMap in aimsPrint.js; clearSelection in aimsSelect.js; and
sendMapXML and justGetMap in aimsXML.js.

File:
aimsXML.js

  其中sendMapXML()函数最后调用:

sendToServer(URLString,XMLRequest,theType)

Arguments:
URLString -- String containing service URL for request.
XMLRequest -- String containing ArcXML request.
theType -- Numeric representing mode number to be passed to XMLMode. Used by processXML in passing ArcXML response to appropriate function for processing.

Returned Value:
None

Description:
Used to pass ArcXML requests on to the server(s). This function updates the form in the PostFrame page
(jsForm.htm) with the current request and processing function name.

Calls: showRetrieveMap, hideRetrieveMap, and hideRetrieveData in aimsMap.js.
Called by: functions sending ArcXML requests to the server(s).

File:
aimsXML.js

///////////////////////////////////////////////////////////////
// aimsCustom.js
// 缺省生成的aimsCustom.js是添加用于定制函数的模版
///////////////////////////////////////////////////////////////
//***************************************地址匹配函数******************************************
/*
* 函数名 addressLocation
* 描 述 在地图上显示地址匹配坐标点
* 参数说明 x,y:地址匹配坐标点的地图坐标
* name :地址匹配点的地图标识
* 返回结果 无
* 使用的公共变量 limitRight limitLeft limitTop limitBottom selectPointMargin
*
* aimsMap.js中的
* eLeft (Numeric/Dynamic) Current extent left (minimum x-coordinate).
* Formerly called left.
* eRight (Numeric/Dynamic) Current extent right (maximum x-coordinate).
* Formerly called right.
* eTop (Numeric/Dynamic) Current extent top (maximum y-coordinate).
* Formerly called top.
* eBottom (Numeric/Dynamic) Current extent bottom (minimum y-coordinate).
* Formerly called bottom.
* showGeocode (Boolean/Dynamic) If true, map request will include
* command to draw point at geocodeX, geocodeY
* with an optional label. Updated by viewer on
* response of address match request or
* zoomToPoint() function.
* geocodeX (Numeric/Dynamic) Geocode point x-coordinate. Updated by
* viewer on address match response or
* by zoomToPoint().
* geocodeY (Numeric/Dynamic) Geocode point y-coordinate. Updated by
* viewer on address match response or
* by zoomToPoint().
* 调 用 sendMapXML(aimsXML.js)
* 被调用
*/
function addressLocation(x,y,name){
legendVisible=false;
hasTOC=false;

var mWMargin = 0;
var mHMargin = 0;
mWMargin = Math.abs(limitRight-limitLeft) * (selectPointMargin/10);
mHMargin = Math.abs(limitTop-limitBottom) * (selectPointMargin/10);
saveLastExtent();
eLeft = parseFloat(x) - parseFloat(mWMargin);
eRight = parseFloat(x) parseFloat(mWMargin);
eTop = parseFloat(y) parseFloat(mHMargin);
eBottom = parseFloat(y) - parseFloat(mHMargin);
showGeocode=true;
geocodeX=x;
geocodeY=y;
geocodeLabel=name;
sendMapXML();
}
/******************************************************
* aimsXML.js
* send the created xml request to map server
*/
function sendMapXML() {
// ask for the Main map
//window.onerror=clearError;
beforeMapRefresh();
//window.onerror=resetError;
showRetrieveMap();

var theText = writeXML();

if (debugOn==2) alert(msgList[12] theText);
//alert(theText);
//hasTOC=false;
sendToServer(imsURL,theText,1);
}
/*****************************************************
*function writeXML()

接收response

processXML(theReplyIn)

Arguments:
theReplyIn--String containing returned ArcXML response.

Returned Value:
None

Description:
Passes the ArcXML response to the appropriate function for processing. The key global is XMLMode,which determines which function to call,即设定XMLMode就可以决定processXML(theReplyIn)调用哪个分析response XML的函数。

Calls: appropriate function to parse ArcXML response.

Called by: passXML in dynamic connector-created page in PostFrame on loading.

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:让处于contentEditable=true的层里面的图片响应键盘事件

下一篇:ArcIMS学习之 HTML Viewer笔记:概要和流程