|
|
@@ -11,6 +11,7 @@ include("scripts/Common/FileZDM.js");
|
|
|
function DrawZdmAll(ratio) {
|
|
|
// 比例尺
|
|
|
this.ratio = ratio || 10.0;
|
|
|
+ this.frameColor = new RColor(255, 255, 0);
|
|
|
}
|
|
|
|
|
|
DrawZdmAll.prototype.applyPainting = function (layer, dmxFile, zdmFile, ctrFile, isCertCsv) {
|
|
|
@@ -33,27 +34,27 @@ DrawZdmAll.prototype.applyPainting = function (layer, dmxFile, zdmFile, ctrFile,
|
|
|
// qsTr("桥梁 隧道") + " (*.ctr);"
|
|
|
var fileCTR = new FileCTR(ctrFile, this.ratio);
|
|
|
fileCTR.applyBridge(zdmData, dmxData, new RColor(31, 57, 197));
|
|
|
- fileCTR.applyTunnel(zdmData, new RColor(255, 255, 0));
|
|
|
+ fileCTR.applyTunnel(zdmData, new RColor(0, 128, 0));
|
|
|
|
|
|
// 以下开始绘画表格数据
|
|
|
var extreme_dmx = this.getExtremePosition(zdmData.length > 0 ? zdmData : dmxData);
|
|
|
- addPolylinetoView([extreme_dmx[0], extreme_dmx[2]], false, false, 0, new RColor(255, 255, 0));
|
|
|
- addPolylinetoView([extreme_dmx[1], extreme_dmx[3]], false, false, 0, new RColor(255, 255, 0));
|
|
|
+ addPolylinetoView([extreme_dmx[0], extreme_dmx[2]], false, false, 0, this.frameColor);
|
|
|
+ addPolylinetoView([extreme_dmx[1], extreme_dmx[3]], false, false, 0, this.frameColor);
|
|
|
var startPoint = extreme_dmx[2];
|
|
|
var endPoint = extreme_dmx[3];
|
|
|
var text_width = 260;
|
|
|
- addPolylinetoView([[startPoint[0] - text_width, startPoint[1]], endPoint], false, false, 0, new RColor(255, 255, 0));
|
|
|
+ addPolylinetoView([[startPoint[0] - text_width, startPoint[1]], endPoint], false, false, 0, this.frameColor);
|
|
|
var array = new Array();
|
|
|
array.push({ name: "R", "space": 60, text: "竖曲线半径 (m)" });
|
|
|
array.push({ name: "SJGC", "space": 100, text: "设计高程 (m)" });
|
|
|
array.push({ name: "DMGC", "space": 100, text: "地面高程 (m)" });
|
|
|
array.push({ name: "PDPC", "space": 100, text: "坡度 (%) 坡长 (m)" });
|
|
|
- array.push({ name: "BLZH", "space": 120, text: "百里桩号 (m)" });
|
|
|
+ array.push({ name: "BLZH", "space": 120, text: "百里桩号 (km)" });
|
|
|
for (var i = 0; i < array.length; i++) {
|
|
|
var item = array[i];
|
|
|
var space = (item.space || 100);
|
|
|
var text = (item.text || "").toString();
|
|
|
- addPolylinetoView([[startPoint[0] - text_width, startPoint[1] - space * (i + 1)], [endPoint[0], endPoint[1] - space * (i + 1)]], false, false, 0, new RColor(255, 255, 0));
|
|
|
+ addPolylinetoView([[startPoint[0] - text_width, startPoint[1] - space * (i + 1)], [endPoint[0], endPoint[1] - space * (i + 1)]], false, false, 0, this.frameColor);
|
|
|
addSimpleTextToView(text, [startPoint[0] - text_width + 50, startPoint[1] - space * (i + 1) + 50], 15, 0, "宋体", RS.VAlignTop, RS.HAlignLeft, false, false, 0);
|
|
|
switch (item.name) {
|
|
|
case "R":
|
|
|
@@ -73,8 +74,8 @@ DrawZdmAll.prototype.applyPainting = function (layer, dmxFile, zdmFile, ctrFile,
|
|
|
break;
|
|
|
}
|
|
|
if (i == array.length - 1) {
|
|
|
- addPolylinetoView([startPoint, [startPoint[0], startPoint[1] - space * (i + 1)]], false, false, 0, new RColor(255, 255, 0));
|
|
|
- addPolylinetoView([endPoint, [endPoint[0], endPoint[1] - space * (i + 1)]], false, false, 0, new RColor(255, 255, 0));
|
|
|
+ addPolylinetoView([startPoint, [startPoint[0], startPoint[1] - space * (i + 1)]], false, false, 0, this.frameColor);
|
|
|
+ addPolylinetoView([endPoint, [endPoint[0], endPoint[1] - space * (i + 1)]], false, false, 0, this.frameColor);
|
|
|
}
|
|
|
}
|
|
|
// 居中显示
|
|
|
@@ -101,7 +102,7 @@ DrawZdmAll.prototype.applyHeightMileage = function (arrayData, startPoint, space
|
|
|
}
|
|
|
}
|
|
|
DrawZdmAll.prototype.applyMileage = function (arrayData, startPoint, space) {
|
|
|
- spaceDistance = 0;
|
|
|
+ var spaceDistance = 0;
|
|
|
var bailiDistance = 0;
|
|
|
var tenBailiDistance = 0;
|
|
|
for (var i = 0; i < arrayData.length; i++) {
|