diff --git a/Source/DataSources/PolylineGeometryUpdater.js b/Source/DataSources/PolylineGeometryUpdater.js index 87e1258e9005..530d49f94c6a 100644 --- a/Source/DataSources/PolylineGeometryUpdater.js +++ b/Source/DataSources/PolylineGeometryUpdater.js @@ -14,6 +14,7 @@ define([ '../Core/GeometryInstance', '../Core/GroundPolylineGeometry', '../Core/Iso8601', + '../Core/oneTimeWarning', '../Core/PolylineGeometry', '../Core/PolylinePipeline', '../Core/ShowGeometryInstanceAttribute', @@ -44,6 +45,7 @@ define([ GeometryInstance, GroundPolylineGeometry, Iso8601, + oneTimeWarning, PolylineGeometry, PolylinePipeline, ShowGeometryInstanceAttribute, @@ -521,6 +523,10 @@ define([ this._clampToGround = defined(clampToGround) ? clampToGround.getValue(Iso8601.MINIMUM_VALUE) : false; + if (!this._clampToGround && defined(zIndex)) { + oneTimeWarning('Entity polylines must have clampToGround: true when using zIndex. zIndex will be ignored.'); + } + this._dynamic = false; this._geometryChanged.raiseEvent(this); }