title: Cesium get coordinates from Entity loaded from KML
body: <p>I am trying to draw an arrowhead for each point in a kml file. For this I plan to fetch coordinates for each point by getById. So far I am getting an error:</p>
  
  <pre><code>Uncaught TypeError: Cannot read property 'position' of undefined (on line 14)
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>var src = Cesium.KmlDataSource.load('../../My_KML/plots.kml', options);
  viewer.dataSources.add(src).then(function(data) {viewer.flyTo(data);});
  
  //-------------------********--------------**********-----------------//
  var point = viewer.entities.getById('geom_20102');
  
  var entities = viewer.entities;
  
   var cartographicPosition = Cesium.Cartographic.fromCartesian(point.position.getValue(Cesium.JulianDate.now()));
              var latitude = Cesium.Math.toDegrees(cartographicPosition.latitude);
              var longitude = Cesium.Math.toDegrees(cartographicPosition.longitude);
  
  var line1 = entities.add({
      polyline : {
          positions : Cesium.Cartesian3.fromDegreesArrayHeights([longitude, latitude, 360, longitude + 1, latitude + 1, 400]),
          width : 10,
          followSurface : false,
          material : new Cesium.PolylineArrowMaterialProperty(Cesium.Color.BLUE)
      }
  });
  </code></pre>
  
  <p>I have specified the element with id 'geom_20102' as a linestring wrapped around by a placemark in the kml. Also I would like to know which id to specify as both placemark and linestring have an id. Or am I confusing kml id with entity id?</p>
  
  <p>I am new to Cesium.Js and I followed this example partially:
  <a href="http://52.4.31.236/tutorials/Cesium-Workshop/" rel="nofollow noreferrer">Cesium Workshop</a></p>
  
  <p>KML snippet:</p>
  
  <pre><code> &lt;Placemark id="feat_20125"&gt;
          &lt;name&gt;874&lt;/name&gt;
          &lt;styleUrl&gt;#stylesel_20102&lt;/styleUrl&gt;
          &lt;LineString id="geom_20102"&gt;
              &lt;coordinates&gt;104.99108,10.4118,247.3 72.991075,26.25412,247.6&lt;/coordinates&gt;
              &lt;altitudeMode&gt;relativeToGround&lt;/altitudeMode&gt;
          &lt;/LineString&gt;
      &lt;/Placemark&gt;
  </code></pre>