|
@@ -80,40 +80,42 @@ export default {
|
|
|
});
|
|
|
// 获取主题数据
|
|
|
this.readGroup().then(data => {
|
|
|
- const parserData = new STopologyParser(null);
|
|
|
- parserData.parseData(data.data.Data[0].Elements);
|
|
|
- // 多边形
|
|
|
- parserData.zoneLegendList.forEach(t => {
|
|
|
- this.scene.addItem(t);
|
|
|
- this.scene.Nodes.push(t);
|
|
|
- });
|
|
|
- // 增加文字
|
|
|
- parserData.textMarkerList.forEach(t => {
|
|
|
- this.scene.addItem(t);
|
|
|
- this.scene.Markers.push(t);
|
|
|
- });
|
|
|
- // 增加图片
|
|
|
- parserData.imageMarkerList.forEach(t => {
|
|
|
- this.scene.addItem(t);
|
|
|
- this.scene.Markers.push(t);
|
|
|
- });
|
|
|
- // 增加直线
|
|
|
- parserData.lineMarkerList.forEach(t => {
|
|
|
- this.scene.addItem(t);
|
|
|
- this.scene.Markers.push(t);
|
|
|
- });
|
|
|
- // 增加图标类图例
|
|
|
- parserData.imageLegendList.forEach(t => {
|
|
|
- this.scene.addItem(t);
|
|
|
- this.scene.Nodes.push(t);
|
|
|
- });
|
|
|
- // 增加管线类
|
|
|
- // 增加图标类图例
|
|
|
- parserData.relationList.forEach(t => {
|
|
|
- this.scene.addItem(t);
|
|
|
- this.scene.Relations.push(t);
|
|
|
- });
|
|
|
- this.view.fitSceneToView();
|
|
|
+ if (data.data.Data) {
|
|
|
+ const parserData = new STopologyParser(null);
|
|
|
+ parserData.parseData(data.data.Data[0].Elements);
|
|
|
+ // 多边形
|
|
|
+ parserData.zoneLegendList.forEach(t => {
|
|
|
+ this.scene.addItem(t);
|
|
|
+ this.scene.Nodes.push(t);
|
|
|
+ });
|
|
|
+ // 增加文字
|
|
|
+ parserData.textMarkerList.forEach(t => {
|
|
|
+ this.scene.addItem(t);
|
|
|
+ this.scene.Markers.push(t);
|
|
|
+ });
|
|
|
+ // 增加图片
|
|
|
+ parserData.imageMarkerList.forEach(t => {
|
|
|
+ this.scene.addItem(t);
|
|
|
+ this.scene.Markers.push(t);
|
|
|
+ });
|
|
|
+ // 增加直线
|
|
|
+ parserData.lineMarkerList.forEach(t => {
|
|
|
+ this.scene.addItem(t);
|
|
|
+ this.scene.Markers.push(t);
|
|
|
+ });
|
|
|
+ // 增加图标类图例
|
|
|
+ parserData.imageLegendList.forEach(t => {
|
|
|
+ this.scene.addItem(t);
|
|
|
+ this.scene.Nodes.push(t);
|
|
|
+ });
|
|
|
+ // 增加管线类
|
|
|
+ // 增加图标类图例
|
|
|
+ parserData.relationList.forEach(t => {
|
|
|
+ this.scene.addItem(t);
|
|
|
+ this.scene.Relations.push(t);
|
|
|
+ });
|
|
|
+ this.view.fitSceneToView();
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
this.scene.emitChange = this.emitChange;
|