| | |
| | | heightReference = Number.POSITIVE_INFINITY; |
| | | } |
| | | var style; |
| | | if (res.style) { |
| | | if (res.outline) { |
| | | style = Cesium.LabelStyle.FILL_AND_OUTLINE |
| | | } else { |
| | | style = Cesium.LabelStyle.FILL |
| | |
| | | res.outlineColor |
| | | ).withAlpha(res.outlineAlpha), |
| | | |
| | | outlineWidth: res.outlineWidth, |
| | | outlineWidth: res.width, |
| | | scale: res.scale, |
| | | style: style, |
| | | horizontalOrigin: Cesium.HorizontalOrigin.CENTER,//对齐方式 |
| | |
| | | addTemporaryPolylineLayer(res) { |
| | | var outlinewidth = 0 |
| | | if (res.outline) { |
| | | outlinewidth = res.outlineWidth |
| | | outlinewidth = res.width |
| | | } |
| | | |
| | | window.Viewer.entities.add({ |
| | | name: res.cnName, |
| | | id: res.id, |
| | | shpType: res.shpType, |
| | | outline: res.outline, |
| | | polyline: { |
| | | outline: res.outline, |
| | | positions: Cesium.Cartesian3.fromDegreesArray(res.geometry), |
| | | width: res.width, |
| | | distanceDisplayCondition: new Cesium.DistanceDisplayCondition( |
| | | res.near, |
| | | res.far |
| | | ), |
| | | |
| | | material: new Cesium.PolylineOutlineMaterialProperty({ |
| | | color: Cesium.Color.fromCssColorString(res.material).withAlpha( |
| | | res.materialAlpha |