|
@@ -538,7 +538,31 @@ export default class Draw {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- drawRoadTip() {}
|
|
|
+ drawRoadTip(vector) {
|
|
|
+ let width;
|
|
|
+ if (vector.way === "twoWay") {
|
|
|
+ width = vector.leftWidth / vector.leftDrivewayCount;
|
|
|
+ } else {
|
|
|
+ width = vector.singleRoadWidth / vector.singleRoadDrivewayCount;
|
|
|
+ }
|
|
|
+ width = width.toFixed(0);
|
|
|
+
|
|
|
+ vector.roadWidthTipsPos.forEach((line) => {
|
|
|
+ const width = help.getRealDistance(line.start, line.end);
|
|
|
+ const start = coordinate.getScreenXY(line.start);
|
|
|
+ const end = coordinate.getScreenXY(line.end);
|
|
|
+
|
|
|
+ const [style] = help.setVectorStyle(this.context, vector, ["NormalLine"]);
|
|
|
+ help.drawStyleLine(this.context, [start, end]);
|
|
|
+ help.drawLineText(this.context, start, end, width, {
|
|
|
+ fillColor: "#fff",
|
|
|
+ padding: 6,
|
|
|
+ fontSize: 12,
|
|
|
+ backColor: style.strokeStyle,
|
|
|
+ });
|
|
|
+ this.drawLineArrow([start, end], true);
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
drawLan(lan, focus) {
|
|
|
const ctx = this.context;
|
|
@@ -581,6 +605,7 @@ export default class Draw {
|
|
|
if (flag) {
|
|
|
const point1 = coordinate.getScreenXY(edgeVector.start);
|
|
|
const point2 = coordinate.getScreenXY(edgeVector.end);
|
|
|
+
|
|
|
help.drawStyleLine(
|
|
|
ctx,
|
|
|
[point1, point2],
|