Adding a new credit with 1.41

Hi,

Probably a stupid question, but I can't for the life of me understand how I can add a new credit since the 1.41 version of Cesium.

Before that version I could do it with this code :

viewer.scene.frameState.creditDisplay.addDefaultCredit(new Cesium.Credit("my credits..."));

But I now get either (depending on browser) nothing or a little "undifined" text next to the default Cesium credit.

The change log (at "https://github.com/AnalyticalGraphicsInc/cesium/blob/1.41/CHANGES.md") says :

"Removed the text, imageUrl, and link parameters from Credit, which were deprecated in Cesium 1.40. Use options.text, options.imageUrl, and options.link instead."

I also didn't see a difference in the documentation.

Thanks for your help!

You can see the new syntax in the documentation, which requires an options object:

https://cesiumjs.org/Cesium/Build/Documentation/Credit.html

var credit = new Cesium.Credit({
    text : 'Cesium',
    imageUrl : '/images/cesium_logo.png',
    link : '[http://cesiumjs.org/](http://cesiumjs.org/)'
});

Thanks. It worked!

Sorry about that, yes the documentation was up-to-date and even had an example...