Credit

new Cesium.Credit(html, showOnScreen)

A credit contains data pertaining to how to display attributions/credits for certain content on the screen.
参数名称 类型 默认值 描述信息
html string An string representing an html code snippet
showOnScreen boolean false 可选 If true, the credit will be visible in the main credit container. Otherwise, it will appear in a popover
Throws:
使用示例:
// Create a credit with a tooltip, image and link
const credit = new Cesium.Credit('<a href="https://cesium.com/" target="_blank"><img src="/images/cesium_logo.png" title="Cesium"/></a>');

成员(属性)

readonly element : HTMLElement

Gets the credit element

readonly html : string

The credit content

showOnScreen : boolean

Whether the credit should be displayed on screen or in a lightbox

方法

static Cesium.Credit.clone(credit)Credit

Duplicates a Credit instance.
参数名称 类型 描述信息
credit Credit 可选 The Credit to duplicate.
返回值:
A new Credit instance that is a duplicate of the one provided. (Returns undefined if the credit is undefined)

static Cesium.Credit.equals(left, right)boolean

Returns true if the credits are equal
参数名称 类型 描述信息
left Credit The first credit
right Credit The second credit
返回值:
true if left and right are equal, false otherwise.

equals(credit)boolean

Returns true if the credits are equal
参数名称 类型 描述信息
credit Credit The credit to compare to.
返回值:
true if left and right are equal, false otherwise.