Credit

A credit contains data pertaining to how to display attributions/credits for certain content on the screen.

new Cesium.Credit(html, showOnScreen)

Name Type Default Description
html string 表示 html 代码片段的字符串
showOnScreen boolean false optional 如果为 true,credit 将在主 credit 容器中可见。否则,它将显示在一个弹出框中。所有 credit 都以 `inline` 方式显示,如果你有图像,我们建议将其尺寸调整为与文字匹配,或使用 css 的 `vertical-align` 来对齐。
Throws:
Example:
// 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"  style="vertical-align: -7px" title="Cesium"/></a>');

Members

readonly element : HTMLElement

获取 credit 元素

readonly html : string

credit 的内容

showOnScreen : boolean

credit 是显示在屏幕上还是在灯箱中显示

Methods

static Cesium.Credit.clone(credit)Credit

复制一个 Credit 实例。
Name Type Description
credit Credit optional 要复制的 Credit。
Returns:
所提供的 Credit 的一个副本新实例。(如果 credit 为 undefined 则返回 undefined)

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

如果 credits 相等则返回 true
Name Type Description
left Credit optional 第一个 credit
right Credit optional 第二个 credit
Returns:
true 如果 left 和 right 相等,false 否则。

equals(credit)boolean

如果 credits 相等则返回 true
Name Type Description
credit Credit optional 要与之比较的 credit。
Returns:
true 如果 left 和 right 相等,false 否则。
需要帮助?获取答案的最快方式是在 Cesium 论坛 上向社区和团队提问。.