diff --git a/Apps/Sandcastle/gallery/CZML ZIndex.html b/Apps/Sandcastle/gallery/CZML ZIndex.html
new file mode 100644
index 000000000000..e967d5f5cc4c
--- /dev/null
+++ b/Apps/Sandcastle/gallery/CZML ZIndex.html
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+
+
+ Cesium Demo
+
+
+
+
+
+
+
+Loading...
+
+
+
+
+
diff --git a/Apps/Sandcastle/gallery/CZML ZIndex.jpg b/Apps/Sandcastle/gallery/CZML ZIndex.jpg
new file mode 100644
index 000000000000..755e21fa8e3e
Binary files /dev/null and b/Apps/Sandcastle/gallery/CZML ZIndex.jpg differ
diff --git a/CHANGES.md b/CHANGES.md
index fb36560b41a5..b3686e2beb13 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -9,16 +9,14 @@ Change Log
* KML and GeoJSON now use `PolylineGraphics` instead of `CorridorGraphics` for polylines on terrain. [#6706](https://github.com/AnalyticalGraphicsInc/cesium/pull/6706)
##### Additions :tada:
-* Added support for Polylines on Terrain via the `Entity` API [#6689](https://github.com/AnalyticalGraphicsInc/cesium/pull/6689)
- * Use the `clampToGround` option for `PolylineGraphics`.
- * Requires depth texture support (`WEBGL_depth_texture` or `WEBKIT_WEBGL_depth_texture`), otherwise `clampToGround` will be ignored.
- * Added `Entity.supportsPolylinesOnTerrain` for checking if the current platform supports `clampToGround`.
-* Added `GroundPolylinePrimitive` and `GroundPolylineGeometry` for rendering polylines on terrain via the `Primitive` API. [#6615](https://github.com/AnalyticalGraphicsInc/cesium/pull/6615)
- * Requires depth texture support (`WEBGL_depth_texture` or `WEBKIT_WEBGL_depth_texture`).
- * Use `GroundPolylinePrimitive.isSupported` to check for support.
-* CZML now supports `clampToGround` and `zIndex` properties for polylines. [#6706](https://github.com/AnalyticalGraphicsInc/cesium/pull/6706)
+* Added support for polylines on terrain [#6689](https://github.com/AnalyticalGraphicsInc/cesium/pull/6689) [#6615](https://github.com/AnalyticalGraphicsInc/cesium/pull/6615)
+ * Use the `clampToGround` option for `PolylineGraphics` (polyline entities).
+ * Requires depth texture support (`WEBGL_depth_texture` or `WEBKIT_WEBGL_depth_texture`), otherwise `clampToGround` will be ignored. Use `Entity.supportsPolylinesOnTerrain` to check for support.
+ * Added `GroundPolylinePrimitive` and `GroundPolylineGeometry`
* `PostProcessStage` has a `selected` property which is an array of primitives used for selectively applying a post-process stage. [#6476](https://github.com/AnalyticalGraphicsInc/cesium/pull/6476)
* The `PostProcessStageLibrary.createBlackAndWhiteStage` and `PostProcessStageLibrary.createSilhouetteStage` have per-feature support.
+* Added CZML support for `zIndex` for `corridor`, `ellipse`, `polygon`, `polyline` and `rectangle`. [#6708](https://github.com/AnalyticalGraphicsInc/cesium/pull/6708)
+* Added CZML `clampToGround` option for `polyline`. [#6706](https://github.com/AnalyticalGraphicsInc/cesium/pull/6706)
##### Fixes :wrench:
* Fixed a bug causing crashes with custom vertex attributes on `Geometry` crossing the IDL. Attributes will be barycentrically interpolated. [#6644](https://github.com/AnalyticalGraphicsInc/cesium/pull/6644)
diff --git a/Source/DataSources/CzmlDataSource.js b/Source/DataSources/CzmlDataSource.js
index e82cfa485d30..ba3597cad1c6 100644
--- a/Source/DataSources/CzmlDataSource.js
+++ b/Source/DataSources/CzmlDataSource.js
@@ -1391,6 +1391,7 @@ define([
processPacketData(Number, corridor, 'outlineWidth', corridorData.outlineWidth, interval, sourceUri, entityCollection);
processPacketData(ShadowMode, corridor, 'shadows', corridorData.shadows, interval, sourceUri, entityCollection);
processPacketData(DistanceDisplayCondition, corridor, 'distanceDisplayCondition', corridorData.distanceDisplayCondition, interval, sourceUri, entityCollection);
+ processPacketData(Number, corridor, 'zIndex', corridorData.zIndex, interval, sourceUri, entityCollection);
}
function processCylinder(entity, packet, entityCollection, sourceUri) {
@@ -1505,6 +1506,7 @@ define([
processPacketData(Number, ellipse, 'numberOfVerticalLines', ellipseData.numberOfVerticalLines, interval, sourceUri, entityCollection);
processPacketData(ShadowMode, ellipse, 'shadows', ellipseData.shadows, interval, sourceUri, entityCollection);
processPacketData(DistanceDisplayCondition, ellipse, 'distanceDisplayCondition', ellipseData.distanceDisplayCondition, interval, sourceUri, entityCollection);
+ processPacketData(Number, ellipse, 'zIndex', ellipseData.zIndex, interval, sourceUri, entityCollection);
}
function processEllipsoid(entity, packet, entityCollection, sourceUri) {
@@ -1765,6 +1767,7 @@ define([
processPacketData(Boolean, polygon, 'closeBottom', polygonData.closeBottom, interval, sourceUri, entityCollection);
processPacketData(ShadowMode, polygon, 'shadows', polygonData.shadows, interval, sourceUri, entityCollection);
processPacketData(DistanceDisplayCondition, polygon, 'distanceDisplayCondition', polygonData.distanceDisplayCondition, interval, sourceUri, entityCollection);
+ processPacketData(Number, polygon, 'zIndex', polygonData.zIndex, interval, sourceUri, entityCollection);
}
function processPolyline(entity, packet, entityCollection, sourceUri) {
@@ -1830,6 +1833,7 @@ define([
processPacketData(Number, rectangle, 'outlineWidth', rectangleData.outlineWidth, interval, sourceUri, entityCollection);
processPacketData(ShadowMode, rectangle, 'shadows', rectangleData.shadows, interval, sourceUri, entityCollection);
processPacketData(DistanceDisplayCondition, rectangle, 'distanceDisplayCondition', rectangleData.distanceDisplayCondition, interval, sourceUri, entityCollection);
+ processPacketData(Number, rectangle, 'zIndex', rectangleData.zIndex, interval, sourceUri, entityCollection);
}
function processWall(entity, packet, entityCollection, sourceUri) {
diff --git a/Specs/DataSources/CzmlDataSourceSpec.js b/Specs/DataSources/CzmlDataSourceSpec.js
index 6c5084a358aa..ac82090fae0c 100644
--- a/Specs/DataSources/CzmlDataSourceSpec.js
+++ b/Specs/DataSources/CzmlDataSourceSpec.js
@@ -1115,7 +1115,8 @@ defineSuite([
rgbaf : [0.2, 0.2, 0.2, 0.2]
},
outlineWidth : 6,
- shadows : 'ENABLED'
+ shadows : 'ENABLED',
+ zIndex: 8
}
};
@@ -1131,6 +1132,7 @@ defineSuite([
expect(entity.ellipse.outlineColor.getValue(Iso8601.MINIMUM_VALUE)).toEqual(new Color(0.2, 0.2, 0.2, 0.2));
expect(entity.ellipse.outlineWidth.getValue(Iso8601.MINIMUM_VALUE)).toEqual(6);
expect(entity.ellipse.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual(ShadowMode.ENABLED);
+ expect(entity.ellipse.zIndex.getValue(Iso8601.MINIMUM_VALUE)).toEqual(8);
});
});
@@ -2370,7 +2372,8 @@ defineSuite([
outlineWidth : 6,
closeTop : false,
closeBottom : false,
- shadows : 'ENABLED'
+ shadows : 'ENABLED',
+ zIndex: 3
}
};
@@ -2391,6 +2394,7 @@ defineSuite([
expect(entity.polygon.closeTop.getValue(Iso8601.MINIMUM_VALUE)).toEqual(false);
expect(entity.polygon.closeBottom.getValue(Iso8601.MINIMUM_VALUE)).toEqual(false);
expect(entity.polygon.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual(ShadowMode.ENABLED);
+ expect(entity.polygon.zIndex.getValue(Iso8601.MINIMUM_VALUE)).toEqual(3);
});
});
@@ -2924,7 +2928,8 @@ defineSuite([
rgbaf : [0.2, 0.2, 0.2, 0.2]
},
outlineWidth : 6,
- shadows : 'ENABLED'
+ shadows : 'ENABLED',
+ zIndex : 6
}
};
@@ -2947,6 +2952,7 @@ defineSuite([
expect(entity.rectangle.outlineColor.getValue(Iso8601.MINIMUM_VALUE)).toEqual(new Color(0.2, 0.2, 0.2, 0.2));
expect(entity.rectangle.outlineWidth.getValue(Iso8601.MINIMUM_VALUE)).toEqual(6);
expect(entity.rectangle.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual(ShadowMode.ENABLED);
+ expect(entity.rectangle.zIndex.getValue(Iso8601.MINIMUM_VALUE)).toEqual(6);
});
});
@@ -3210,7 +3216,8 @@ defineSuite([
rgbaf : [0.2, 0.2, 0.2, 0.2]
},
outlineWidth : 6,
- shadows : 'ENABLED'
+ shadows : 'ENABLED',
+ zIndex: 5
}
};
@@ -3233,6 +3240,7 @@ defineSuite([
expect(entity.corridor.outlineColor.getValue(Iso8601.MINIMUM_VALUE)).toEqual(new Color(0.2, 0.2, 0.2, 0.2));
expect(entity.corridor.outlineWidth.getValue(Iso8601.MINIMUM_VALUE)).toEqual(6);
expect(entity.corridor.shadows.getValue(Iso8601.MINIMUM_VALUE)).toEqual(ShadowMode.ENABLED);
+ expect(entity.corridor.zIndex.getValue(Iso8601.MINIMUM_VALUE)).toEqual(5);
});
});