aimsCustom.js
资源名称:arcims.rar [点击查看]
上传用户:gzuoyue
上传日期:2022-07-08
资源大小:177k
文件大小:4k
源码类别:
GIS编程
开发平台:
ASP/ASPX
- // aimsCustom.js
- /*
- * JavaScript template file for ArcIMS HTML Viewer
- * dependent on aimsXML.js, ArcIMSparam.js, aimsCommon.js, aimsMap.js,
- * aimsLayers.js, aimsDHTML.js
- * aimsClick.js, aimsNavigation.js,
- */
- // global variables
- aimsCustomPresent=true;
- // change these to send XML response to custom function.
- // use numbers >= 1000 and match in useCustomFunction()
- // defaults are defined in aimsXML.js and use standard functions
- // xml response mode for selection
- selectXMLMode = 6;
- // xml response mode for identify
- identifyXMLMode = 7;
- // xml response mode for query
- queryXMLMode = 8;
- // xml response mode for find
- findXMLMode = 14;
- // xml response mode hyperlink
- hyperlinkXMLMode = 15;
- // custom function for handling clicks
- // flow redirected here when
- // toolMode set to >=1000
- function customMapTool(e) {
- if (toolMode == 1001) {
- // insert code here
- return false;
- }
- if (toolMode == 1002) {
- // insert code here
- }
- }
- // send XML response to custom function
- // flow redirected here when
- // XMLMode >=1000
- function useCustomFunction(theReply) {
- if (XMLMode==1001) {
- setCustomLayerFieldsend(theReply);
- } else if (XMLMode==1002) {
- // insert code here
- } else {
- alert(msgList[55] + XMLMode + msgList[56]);
- }
- hideLayer("LoadData");
- }
- // add custom stuff to Map XML request. . . between selection and geocode
- function addCustomToMap1(){
- var customString = "";
- if (mCustomLayer.bCustomLayer){
- // customString = mCustomLayer.getCustomLayerString();
- //全部临时图层的属性
- customString += getCustonmsWorkSpace();
- if (CustonmsLayerAddNum!=0){
- var _CusStr = '';
- var _old = mCustomLayer.getCustomLayerString();
- //alert(LayerVisible.join('n'));
- for (var ji=CustonmsLayerBegin[0];ji<LayerVisible.length;ji++){
- CustonmsLayerVisible[ji] = LayerVisible[ji+serverLayerCount];
- }
- //alert(CustonmsLayerVisible.join('n'));
- for (var iK=0;iK<CustonmsLayerAddNum;iK++){
- _CusStr = '';
- //alert(CustonmsLayerBegin[iK]+'n'+CustonmsLayerEnd[iK])
- for (var i=CustonmsLayerBegin[iK];i<CustonmsLayerEnd[iK]+1;i++) {
- if (CustonmsLayerVisible[i]==1){
- _CusStr += 'true,';
- }else{
- _CusStr += 'false,';
- }
- }
- //alert(CustonmsLayerVisible.join('n'));
- mCustomLayer.setCustomLayerString(CustonmsLayerString[iK]);
- //alert(CustonmsLayerBegin[iK]+'n'+CustonmsLayerEnd[iK]+'n'+CustonmsLayerString[iK]+'n'+_CusStr);
- mCustomLayer.setLayerVisible(_CusStr);
- CustonmsLayerString[iK] = mCustomLayer.getCustomLayerString();
- customString += getCustonmsLayerList(CustonmsLayerString[iK])//CustonmsLayerString[iK];
- //alert(customString);
- }
- mCustomLayer.setCustomLayerString(_old);
- //完毕
- }else{
- customString = mCustomLayer.getCustomLayerString();
- }
- }
- return customString;
- }
- // add custom stuff to Map XML request. . . between clickpoints and copyright
- function addCustomToMap2(){
- var customString = "";
- return customString;
- }
- // add custom stuff to Map XML request. . . under modeOnMap
- function addCustomToMap3(){
- var customString = "";
- /*
- customString += '<LAYER type="ACETATE" name="theMode">n';
- customString += '<OBJECT units="PIXEL">n<TEXT coords="5 ' + (iHeight-10) + '" label="This is a test">n';
- customString += '<TEXTMARKERSYMBOL fontstyle="BOLD" fontsize="12" font="ARIAL" fontcolor="255,255,255" ';
- customString += 'threed="TRUE" glowing="'128,0,255" />n</TEXT>n</OBJECT>';
- customString += 'n</LAYER>n';
- alert(customString);
- */
- return customString;
- }
- // add custom stuff to Map XML request. . . on top of everything
- function addCustomToMap4(){
- var customString = "";
- return customString;
- }
- // extract layers to download
- function extractIt() {
- hideLayer("measureBox");
- alert(msgList[51]);
- }