[cesium-dev] viewer.entities is undefined

You are either using a very old version of Cesium or you haven’t actually declared and instantiated the viewer object. I suggest you check out http://cesiumjs.org/2015/02/02/Visualizing-Spatial-Data/