Adding a new credit with 1.41


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 "") says :

"Removed the text, imageUrl, and link parameters from Credit, which were deprecated in Cesium 1.40. Use options.text, options.imageUrl, and 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:

var credit = new Cesium.Credit({
    text : 'Cesium',
    imageUrl : '/images/cesium_logo.png',
    link : '[]('

Thanks. It worked!

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