| | |
| | | this.$store.state.primitLayer = null; |
| | | } |
| | | var wkt = this.$wkt.parse(val1); |
| | | this.setMapLoaction(wkt,row); |
| | | this.setMapLoaction(wkt, row); |
| | | } |
| | | }, |
| | | handleSizeChange(val) { |
| | |
| | | this.listdata.pageIndex = val; |
| | | this.getSpaceTableLayer(); |
| | | }, |
| | | setMapLoaction(res,properties) { |
| | | setMapLoaction(res, properties) { |
| | | if (this.$store.state.primitLayer != null) { |
| | | sgworld.Creator.DeleteObject(this.$store.state.primitLayer); |
| | | // this.$store.state.primitLayer = null; |
| | |
| | | |
| | | ); |
| | | this.$store.state.primitLayer = Viewer.entities.add({ |
| | | properties:properties, |
| | | tag : "properties_point", |
| | | properties: properties, |
| | | tag: "properties_point", |
| | | position: val, |
| | | billboard: { |
| | | // 图像地址,URI或Canvas的属性 |
| | |
| | | sgworld.Navigate.flyToObj(this.$store.state.primitLayer) |
| | | |
| | | window.propertieshandler = new Cesium.ScreenSpaceEventHandler( |
| | | sgworld.Viewer.scene.canvas |
| | | sgworld.Viewer.scene.canvas |
| | | ); |
| | | window.propertieshandler.setInputAction(event => { |
| | | let pick = sgworld.Viewer.scene.pick(event.position); |
| | | // debugger; |
| | | // ; |
| | | if (pick && pick.id && pick.id.tag == "properties_point") { |
| | | this.$store.state.propertiesFlag = '1'; |
| | | let properties = pick.id.properties; |
| | |
| | | let obj = {}; |
| | | this.attributeData.forEach(item => { |
| | | propertyNames.forEach(itemElement => { |
| | | if (itemElement == item.field){ |
| | | if (itemElement == item.field) { |
| | | obj[item.alias] = properties[itemElement]._value |
| | | } |
| | | }) |