|
@@ -19,6 +19,7 @@ import { uiService } from "./Service/UIService";
|
|
|
import { crossPointService } from "./Service/CrossPointService.js";
|
|
|
import Road from "./Geometry/Road.js";
|
|
|
import { edgeService } from "./Service/EdgeService.js";
|
|
|
+import { curvePointService } from "./Service/CurvePointService.js";
|
|
|
|
|
|
export default class Load {
|
|
|
constructor(layer) {
|
|
@@ -152,52 +153,33 @@ export default class Load {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- // if (dataLocal.curvelines) {
|
|
|
- // for (let key in dataLocal.curvelines) {
|
|
|
- // let startPointId = dataLocal.curvelines[key].startId
|
|
|
- // let endPointId = dataLocal.curvelines[key].endId
|
|
|
|
|
|
- // let startPosition = null;
|
|
|
- // let endPosition = null ;
|
|
|
- // if(dataLocal.curvePoints){
|
|
|
- // startPosition ={
|
|
|
- // x:dataLocal.curvePoints[startPointId].x,
|
|
|
- // y:dataLocal.curvePoints[startPointId].y,
|
|
|
- // }
|
|
|
- // endPosition ={
|
|
|
- // x:dataLocal.curvePoints[endPointId].x,
|
|
|
- // y:dataLocal.curvePoints[endPointId].y,
|
|
|
- // }
|
|
|
-
|
|
|
- // }
|
|
|
+ if (dataLocal.curvePoints) {
|
|
|
+ for (let key in dataLocal.curvePoints) {
|
|
|
+ let curvePointData = dataLocal.curvePoints[key];
|
|
|
+ let curvePoint = curvePointService.create(
|
|
|
+ curvePointData,
|
|
|
+ curvePointData.vectorId
|
|
|
+ );
|
|
|
+ curvePoint.setIndex(curvePointData.index);
|
|
|
+ curvePoint.setPointParent(curvePointData.parent);
|
|
|
+ dataService.addCurvePoint(curvePoint);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- // let curveline = lineService.createCurveLine(
|
|
|
- // startPosition,
|
|
|
- // endPosition,
|
|
|
- // dataLocal.curvelines[key].vectorId,
|
|
|
- // );
|
|
|
+ if (dataLocal.curvelines) {
|
|
|
+ for (let key in dataLocal.curvelines) {
|
|
|
+ let curveLineData = dataLocal.curvelines[key];
|
|
|
+ let curveLine = lineService.createCurveLineByPointIds(
|
|
|
+ curveLineData.points,
|
|
|
+ curveLineData.vectorId
|
|
|
+ );
|
|
|
+ curveLine.setStyle(curveLineData.style);
|
|
|
+ curveLine.setWeight(curveLineData.weight);
|
|
|
+ dataService.addCurveLine(curveLine);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- // if (dataLocal.curvelines[key].style) {
|
|
|
- // curveline.setStyle(dataLocal.curvelines[key].style);
|
|
|
- // }
|
|
|
- // if (dataLocal.curvelines[key].weight) {
|
|
|
- // curveline.setWeight(dataLocal.curvelines[key].weight);
|
|
|
- // }
|
|
|
- // if (dataLocal.curvelines[key].color) {
|
|
|
- // curveline.setColor(dataLocal.curvelines[key].color);
|
|
|
- // }
|
|
|
- // if (dataLocal.curvelines[key].value) {
|
|
|
- // curveline.setValue(dataLocal.curvelines[key].value);
|
|
|
- // }
|
|
|
- // if (dataLocal.curvelines[key].locationMode) {
|
|
|
- // curveline.setLocationMode(dataLocal.curvelines[key].locationMode);
|
|
|
- // }
|
|
|
- // curveline.setDisplay(dataLocal.curvelines[key].display);
|
|
|
- // if (curveline.getCategory() == VectorCategory.Line.BaseLine) {
|
|
|
- // Settings.baseLineId = key;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
if (dataLocal.roadPoints) {
|
|
|
for (let key in dataLocal.roadPoints) {
|
|
|
roadPointService.create(
|