|
@@ -3,6 +3,8 @@ import Geometry from "./Geometry.js";
|
|
|
import Settings from "../Settings";
|
|
|
import Constant from "../Constant";
|
|
|
|
|
|
+import {coordinate} from '../Coordinate.js'
|
|
|
+
|
|
|
export default class Road extends Geometry {
|
|
|
constructor(startId, endId, vectorId) {
|
|
|
super();
|
|
@@ -24,14 +26,17 @@ export default class Road extends Geometry {
|
|
|
this.leftDrivewayCount = Settings.roadLeftDrivewayCount; //左边的车道个数
|
|
|
this.rightDrivewayCount = Settings.roadRightDrivewayCount; //右边的车道个数
|
|
|
this.geoType = VectorType.Road;
|
|
|
- this.leftWidth = Settings.roadLeftDrivewayCount * Settings.singleLaneWidth;
|
|
|
+
|
|
|
+
|
|
|
+ this.leftWidth = (Settings.roadLeftDrivewayCount * Settings.singleLaneWidth) * window.coordinate.ratio;
|
|
|
this.rightWidth =
|
|
|
- Settings.roadRightDrivewayCount * Settings.singleLaneWidth;
|
|
|
+ Settings.roadRightDrivewayCount * Settings.singleLaneWidth* window.coordinate.ratio;
|
|
|
this.singleRoadDrivewayCount = Settings.singleRoadDrivewayCount;
|
|
|
this.singleRoadWidth =
|
|
|
- Settings.singleRoadDrivewayCount * Settings.singleLaneWidth;
|
|
|
+ Settings.singleRoadDrivewayCount * Settings.singleLaneWidth* window.coordinate.ratio;
|
|
|
this.way = Settings.wayType;
|
|
|
this.setId(vectorId);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
setWidth(value, dir) {
|