| | |
| | | this.imagePoint = null; |
| | | } |
| | | var wkt = this.$wkt.parse(val1); |
| | | this.setMapLoaction(wkt,row); |
| | | this.setMapLoaction(wkt, row); |
| | | } |
| | | }, |
| | | setMapLoaction(res) { |
| | |
| | | if (val1) { |
| | | var wkt = this.$wkt.parse(val1); |
| | | // this.getprimitiLayer(wkt); |
| | | this.primitivesAddLayer(wkt,properties); |
| | | this.primitivesAddLayer(wkt, properties); |
| | | } |
| | | } |
| | | }, |
| | |
| | | break; |
| | | } |
| | | }, |
| | | primitivesAddLayer(res,properties) { |
| | | primitivesAddLayer(res, properties) { |
| | | switch (res.type) { |
| | | case "Point": |
| | | var val = Cesium.Cartesian3.fromDegrees( |
| | |
| | | ); |
| | | var point = Viewer.entities.add({ |
| | | position: val, |
| | | properties:properties, |
| | | tag : "properties_point", |
| | | properties: properties, |
| | | tag: "properties_point", |
| | | billboard: { |
| | | // 图像地址,URI或Canvas的属性 |
| | | image: SmartEarthRootUrl + "Workers/image/mark.png", |
| | |
| | | }); |
| | | point.billboard.disableDepthTestDistance = Number.POSITIVE_INFINITY; |
| | | this.$store.state.queryInfo.push(point); |
| | | //点击事件 |
| | | //点击事件 |
| | | 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; |
| | |
| | | obj["eventid"] = properties['_eventid']._value; |
| | | this.attributeData.forEach(item => { |
| | | propertyNames.forEach(itemElement => { |
| | | if (itemElement == item.field){ |
| | | if (itemElement == item.field) { |
| | | obj[item.alias] = properties[itemElement]._value |
| | | } |
| | | }) |