Cannot call method 'cartographicToCartesian' of undefined

Try to add a label to the TerrainInspector sample. I got this error:Cannot call method ‘cartographicToCartesian’ of undefined.

I download; add following into index.html of TerrainInspector folder:

var ellipsoid = centralBody.getEllipsoid(); // or var ellipsoid = viewer.centralBody.getEllipsoid();

var labels = new Cesium.LabelCollection();


position : ellipsoid.cartographicToCartesian(Cesium.Cartographic.fromDegrees(-75.10, 39.57)),

text : ‘Philadelphia’



if I add this one:

var labels = new Cesium.LabelCollection();

var label = labels.add();


I will got this error: Cannot call method ‘add’ of undefined

what is wrong here? Thanks.

Find the reason because I mixed b25 version code with master file code. API changed alittle bit.