Inserting content from another API

Hi,

I am playing around with the sandbox and trying to plug in some content from the New York Times.

Here is my code, not sure why I cannot get it to load the data into the element description.

Is this something that is currently supported?

Hello,

Can you tell me a little more about what you’re trying to do? I don’t understand what you’re using Cesium for.

Thanks,

Hannah

I am trying to add a json object to the description on an entity. If someone clicks on Seattle for example, I would like to post the top current news for Seattle that I am getting from the New York Times API.

Okay. Once you’ve retrieved the data, you need to set the description property on the entity. Here is a quick Sandcastle example:

var viewer = new Cesium.Viewer(‘cesiumContainer’);
var entity = viewer.entities.add({
position: Cesium.Cartesian3.fromDegrees(-114.0, 40.0, 300000.0),
box : {
dimensions : new Cesium.Cartesian3(400000.0, 300000.0, 500000.0),
material : Cesium.Color.BLUE
}
});

entity.description = ‘This is my description’;

``

Best,

Hannah