title: Displaying a polyline(with some height) in Cesium
body: <p>Can someone please tell me what's wrong with this piece of code?</p>
  
  <pre><code>    Cesium.Math.setRandomNumberSeed(1234);
  
      var viewer = new Cesium.Viewer('cesiumContainer');
      var entities = viewer.entities;
      var boxes = entities.add(new Cesium.Entity());
      var polylines = new Cesium.PolylineCollection();
  
      //Create the entities and assign each entity's parent to the group to which it belongs.
      for (var i = 0; i &lt; 5; ++i) {
          var height = 100000.0 + (200000.0 * i);
          entities.add({
              parent : boxes,
              position : Cesium.Cartesian3.fromDegrees(-106.0, 45.0, height),
              box : {
                  dimensions : new Cesium.Cartesian3(90000.0, 90000.0, 90000.0),
                  material : Cesium.Color.fromRandom({alpha : 1.0})
              }
          });
          entities.add({
              parent : polylines,
              position : Cesium.Cartesian3.fromDegrees(-86.0, 55.0, height),
              polyline : {
                  width : new Cesium.ConstantProperty(2),
                  material : Cesium.Color.fromRandom({alpha : 1.0}),
                  followSurface : new Cesium.ConstantProperty(false)
              }
          });
      }
      viewer.zoomTo(viewer.entities);
  </code></pre>
  
  <p>It displays boxes at the given coordinates but when I am trying to draw a poly-line it gives this error:
  Uncaught TypeError: Cannot read property 'push' of undefined (on line 300 of <a href="https://cesiumjs.org/Cesium/Source/DataSources/Entity.js" rel="nofollow">https://cesiumjs.org/Cesium/Source/DataSources/Entity.js</a>)</p>
  
  <p>I want something like this
  <a href="https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Custom%20DataSource.html&amp;label=Showcases" rel="nofollow">https://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Custom%20DataSource.html&amp;label=Showcases</a></p>
  
  <p>Thanks in advance.</p>