|
@@ -1,6 +1,10 @@
|
|
|
import { dataService } from "./Service/DataService.js";
|
|
|
import { lineService } from "./Service/LineService.js";
|
|
|
+import { roadService } from "./Service/RoadService.js";
|
|
|
+import { curveRoadService } from "./Service/CurveRoadService.js";
|
|
|
import { pointService } from "./Service/PointService.js";
|
|
|
+import {curveRoadPointService } from "./Service/CurveRoadPointService.js";
|
|
|
+import { roadPointService } from "./Service/RoadPointService.js";
|
|
|
import { imageService } from "./Service/ImageService.js";
|
|
|
import VectorCategory from "./enum/VectorCategory.js";
|
|
|
import { coordinate } from "./Coordinate.js";
|
|
@@ -21,6 +25,7 @@ export default class Load {
|
|
|
|
|
|
async load(dataLocal, data3d) {
|
|
|
this.layer.initLocation();
|
|
|
+ console.error(dataLocal)
|
|
|
if (dataLocal) {
|
|
|
if (dataLocal.backgroundImg) {
|
|
|
let bgImg = imageService.createBackgroundImg(
|
|
@@ -86,7 +91,7 @@ export default class Load {
|
|
|
svg.setPoints(dataLocal.svgs[key].points);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (dataLocal.lines) {
|
|
|
for (let key in dataLocal.lines) {
|
|
|
let line = lineService.createByPointId(
|
|
@@ -117,6 +122,41 @@ export default class Load {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if(dataLocal.roadPoints){
|
|
|
+
|
|
|
+ for (let key in dataLocal.roadPoints) {
|
|
|
+ let roadPoint = roadPointService.create(
|
|
|
+ dataLocal.roadPoints[key],
|
|
|
+ dataLocal.roadPoints[key].vectorId,
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(dataLocal.roads){
|
|
|
+ for (let key in dataLocal.roads) {
|
|
|
+ let road = roadService.create(
|
|
|
+ dataLocal.roads[key].startId,
|
|
|
+ dataLocal.roads[key].endId,
|
|
|
+ dataLocal.roads[key].vectorId,
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(dataLocal.curveRoadPoints){
|
|
|
+ for (let key in dataLocal.curveRoadPoints) {
|
|
|
+ let curveRoadPoint = curveRoadPointService.create(
|
|
|
+ dataLocal.curveRoadPoints[key],
|
|
|
+ dataLocal.curveRoadPoints[key].vectorId,
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(dataLocal.curveRoads){
|
|
|
+ for (let key in dataLocal.curveRoads) {
|
|
|
+ let curveRoad = curveRoadService.create(
|
|
|
+ dataLocal.curveRoads[key].startId,
|
|
|
+ dataLocal.curveRoads[key].endId,
|
|
|
+ dataLocal.curveRoads[key].vectorId,
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
if (dataLocal.texts) {
|
|
|
for (let key in dataLocal.texts) {
|
|
|
let text = textService.create(dataLocal.texts[key].center, key);
|