Skip to content

Commit d5d3687

Browse files
committed
Set billboard opacity
1 parent 2d48300 commit d5d3687

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

Cesium.externs.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ Cesium.BillboardCollection = function() {};
112112
/**
113113
* @typedef {{
114114
* image: (string|HTMLCanvasElement|Image),
115+
* color: (Cesium.Color|undefined),
115116
* verticalOrigin: (Cesium.VerticalOrigin|undefined),
116117
* horizontalOrigin: (Cesium.HorizontalOrigin|undefined),
117118
* position: !Cesium.Cartesian3
@@ -471,7 +472,7 @@ Cesium.CameraEventAggregator.prototype.isDestroyed = function() {};
471472

472473

473474
/**
474-
*/
475+
*/
475476
Cesium.CameraEventAggregator.prototype.destroy = function() {};
476477

477478

ol3

Submodule ol3 updated from bcd9837 to 13ce41a

src/core.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,9 +787,15 @@ goog.require('olcs.core.OlLayerPrimitive');
787787
}
788788
var center = geometry.getCoordinates();
789789
var position = olcs.core.ol4326CoordinateToCesiumCartesian(center);
790+
var color;
791+
var opacity = imageStyle.getOpacity();
792+
if (goog.isDef(opacity)) {
793+
color = new Cesium.Color(1.0, 1.0, 1.0, opacity);
794+
}
790795
var bb = billboards.add({
791796
// always update Cesium externs before adding a property
792797
image: image,
798+
color: color,
793799
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
794800
position: position
795801
});

0 commit comments

Comments
 (0)