📄 aimsxml.js
字号:
break;
case 5:
// get a list of ImageServices
//alert("processXML()[5]\n" + theReply);
processCatalog(theReply);
break;
case 6:
// get select response
displayAttributeData(theReply);
break;
case 7:
// get identify response
//alert(theReply);
displayAttributeData(theReply);
break;
case 8:
// get query response
//alert("processXML()[8]\nQuery XML Response:\n" + theReply);
displayAttributeData(theReply);
break;
case 9:
// get geocode response
processGeocode(theReply);
break;
case 10:
// get identifyall response
doIdentifyAll(theReply);
break;
case 11:
// get buffer response
getBufferAttributeData(theReply)
break;
/*
case 13:
// get route response
processRoute(theReply);
break;
*/
case 14:
// get find response
//alert(theReply);
displayAttributeData(theReply);
break;
case 15:
// get hyperlink response
parseHyperLink(theReply);
break;
case 16:
// get hyperlinkAny response
parseHyperLinkAny(theReply);
break;
case 20:
// process startup query
parseStartQuery(theReply);
break;
case 25:
// get geocoding layers
parseGeocodeLayers(theReply);
// continue startup
if ((aimsQueryPresent) && (highlightedOne!="") && (queryZoom)) {
setStartQuery();
} else {
sendMapXML();
}
break;
case 26:
// get geocoding layers
if (parseGeocodeParams(theReply,GCLayers[GCActiveLayer])) {
var theAddressForm = appDir + "addmatch.htm";
if ((useExternalWindow) || (!useTextFrame)) {
var Win1 = window.open(theAddressForm,"GeocodeWindow","width=575,height=150,scrollbars=yes,resizable=yes");
} else {
parent.TextFrame.document.location= theAddressForm;
}
} else {
if (debugOn>0) {
alert(msgList[17] + "\n" + theReply);
if (parent.TextFrame!=null) parent.TextFrame.document.location= appDir + "blank.htm";
} else {
alert(msgList[17]);
if (parent.TextFrame!=null) parent.TextFrame.document.location= appDir + "blank.htm";
}
}
break;
case 27:
// get geocoding results
parseGeocodeResults(theReply);
break;
case 40:
// get list of sample field values
parseFieldSamples(theReply);
writeQueryForm();
break;
case 55:
// get layer storedqueries
//alert("55\n" + theReply);
parseStoredQueries(theReply);
break;
case 70:
// get layer field for submission to external db
parseIDFieldData(theReply);
break;
case 98:
// just put up a map with legend
var theURL = "";
theURL = getURL(theReply);
if (theURL != "") {
document.theImage.src = theURL;
}
if (legendVisible) {
showLegend();
drawLegendOnly=false;
}
hideRetrieveMap();
break;
case 99:
// just put up a map
var theURL = "";
legendVisible=legendTemp;
theURL = getURL(theReply);
if (theURL != "") {
document.theImage.src = theURL;
}
else {
alert(msgList[14] + theReply);
}
hideRetrieveMap();
break;
case 101:
// print - get Map image
printMapURL = getURL(theReply);
printLegURL = getLegendURL(theReply);
if (hasOVMap) {
getPrintOV();
} else {
//writePrintPage();
getPrintLegend();
}
break;
case 102:
// print - get OV image
printOVURL = getURL(theReply);
legendImage = printLegURL
getPrintLegend();
break;
case 103:
// print - get Legend image
hideRetrieveMap();
writePrintPage();
break;
case 900:
// just make a map
var theURL = "";
theURL = getURL(theReply);
if (theURL != "") {
getXYs(theReply);
document.theImage.src = theURL;
}
break;
case 902:
// just put up an overview map
var theURL = "";
theURL = getURL(theReply);
//alert(theURL);
if (theURL != "") {
ovImageVar.src = theURL;
}
var tempLeft = fullLeft;
var tempRight = fullRight;
var tempTop = fullTop;
var tempBottom = fullBottom;
getOVXYs(theReply);
pastStart = true;
fullLeft = tempLeft;
fullRight = tempRight;
fullTop = tempTop;
fullBottom = tempBottom;
var theString = '<ARCXML version="1.1">\n<REQUEST>\n<GET_SERVICE_INFO renderer="false" extensions="true" ';
if (aimsLayersPresent) {
if (LayerID.length>0) {
theString += 'fields="false" ';
} else {
theString += 'fields="true" ';
}
} else {
theString += 'fields="false" ';
}
theString += '/>\n</REQUEST>\n</ARCXML>';
sendToServer(imsURL,theString,3);
break;
default:
// send any responses to custom requests off to the custom handler
// XMLMode >= 1000 are reserved for custom requests/responses
if (XMLMode >= 1000) {
useCustomFunction(theReply);
} else {
alert(theReply + msgList[19]);
}
}
}
// prepare the request in xml format for Main Map
function writeXML() {
var theString = '<ARCXML version="1.1">\n<REQUEST>\n<GET_IMAGE>\n<PROPERTIES>\n<ENVELOPE minx="' + forceComma(eLeft) + '" miny="' + forceComma(eBottom) + '" maxx="' + forceComma(eRight) + '" maxy="' + forceComma(eTop) + '" />\n';
theString += '<IMAGESIZE height="' + iHeight + '" width="' + iWidth + '" />\n';
var visString = "";
if (aimsLayersPresent) {
// tell the server which layers are to be visible
if (toggleVisible) {
theString += '<LAYERLIST >\n';
for (var i=0;i<layerCount;i++) {
if (LayerVisible[i]==1) {
theString += '<LAYERDEF id="' + LayerID[i] + '" visible="true" ';
if (aimsClassRenderPresent) {
theString += addSpecialRenderToMap(i);
} else {
theString += '/>\n';
}
}
else {
theString += '<LAYERDEF id="' + LayerID[i] + '" visible="false" />\n';
}
}
theString += '</LAYERLIST>\n';
}
}
// map background color
if (mapTransparent) {
theString += '<BACKGROUND color="255,255,254" transcolor="255,255,254" />\n';
} else {
if (mapBackColor!="") {
theString += '<BACKGROUND color="' + mapBackColor + '" />\n\n';
}
}
if (aimsLegendPresent) {
// create a legend image
if (legendVisible) theString += addLegendToMap();
}
theString += '</PROPERTIES>\n';
// buffer
if (aimsBufferPresent) {
if (showBuffer) theString += addBufferToMap();
}
// select
if (aimsSelectPresent) {
theString += addSelectToMap();
}
// any custom stuff to fit here
if (aimsCustomPresent) theString += addCustomToMap1();
if (aimsClickPresent){
// clickpoints
if (clickCount>0) {
// draw click points and lines between them on map
var clickColor = selectColor;
if (clickType==1) clickColor = clickMarkerColor;
theString += '<LAYER type="acetate" name="allTheClicks">\n';
if (clickCount>1) {
theString += '<OBJECT units="database">\n<LINE coords="' + forceComma(clickPointX[0]) + coordsDelimiter + forceComma(clickPointY[0]);
for (var i=1;i<clickCount;i++) {
theString += pairsDelimiter + forceComma(clickPointX[i]) + coordsDelimiter + forceComma(clickPointY[i]);
}
theString += '" >\n';
theString += '<SIMPLELINESYMBOL type="solid" color="' + clickMarkerColor;
theString += '" width="3" />\n</LINE>\n</OBJECT>\n';
theString += '<OBJECT units="database">\n<LINE coords="' + forceComma(clickPointX[0]) + coordsDelimiter + forceComma(clickPointY[0]);
for (var i=1;i<clickCount;i++) {
theString += pairsDelimiter + forceComma(clickPointX[i]) + coordsDelimiter + forceComma(clickPointY[i]);
}
theString += '" >\n';
theString += '<SIMPLELINESYMBOL type="solid" color="255,255,255" width="1" />\n</LINE>\n</OBJECT>\n';
}
for (var i=0;i<clickCount;i++) {
theString += '<OBJECT units="database">\n<POINT coords="' + forceComma(clickPointX[i]) + coordsDelimiter + forceComma(clickPointY[i]) + '">\n';
theString += '<SIMPLEMARKERSYMBOL type="' + clickMarkerType + '"';
theString += ' color="' + clickMarkerColor + '" width="' + clickMarkerSize + '" />\n</POINT>\n</OBJECT>\n';
}
theString += '</LAYER>\n';
}
}
// route display - requires RouteServer extension
if (aimsRoutePresent) {
if (geocodeAppMode=="route") theString += addRouteToMapXML("");
}
// geocoding or point with label
if (showGeocode) {
// draw the point . . . also used to display any point with a label on map
theString += '<LAYER type="acetate" name="GeoCode1">\n';
theString += '<OBJECT units="database">\n<POINT coords="' + forceComma(geocodeX) + coordsDelimiter + forceComma(geocodeY) + '">\n';
theString += '<SIMPLEMARKERSYMBOL type="circle" color="' + geocodePointColor + '" width="' + geocodePointSize +'" overlap="false" />\n</POINT></OBJECT>\n';
if (geocodeLabel!="") {
theString += '<OBJECT units="database">\n<TEXT coords="' + forceComma(geocodeX) + coordsDelimiter + forceComma(geocodeY) + '" label="' + geocodeLabel + '">\n';
theString += '<TEXTMARKERSYMBOL fontcolor="' + geocodePointColor + '" fontsize="12" shadow="64,64,64" glowing="255,255,0" halignment="right" valignment="top" overlap="false" /></TEXT></OBJECT>\n';
}
theString += '</LAYER>\n';
}
// any custom stuff to fit here
if (aimsCustomPresent) theString += addCustomToMap2();
if (drawBottomBar) {
theString += '<LAYER type="acetate" name="theBottomBar">\n';
theString += '<OBJECT units="pixel">\n<POLYGON ';
theString += 'coords="0' + coordsDelimiter + '1' + pairsDelimiter;
theString += '1' + coordsDelimiter + bottomBarHeight + pairsDelimiter;
theString += (iWidth-1) + coordsDelimiter + bottomBarHeight + pairsDelimiter;
theString += (iWidth-1) + coordsDelimiter + '1' + pairsDelimiter;
theString += '0' + coordsDelimiter + '1">\n';
theString += '<SIMPLEPOLYGONSYMBOL fillcolor="' + bottomBarColor + '" boundary="true" boundarycolor="' + bottomBarOutline + '" overlap="false" />\n';
theString += '</POLYGON>\n</OBJECT>\n';
theString += '</LAYER>\n';
}
if (drawCopyright) {
// draw text on the map
theString += '<LAYER type="acetate" name="theCopyright">\n';
theString += '<OBJECT units="pixel">\n<TEXT coords="' + CopyrightCoords + '" label="' + CopyrightText + '">\n';
theString += '<TEXTMARKERSYMBOL fontstyle="' + CopyrightStyle + '" fontsize="' + CopyrightSize + '" ';
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -