Credit

new Cesium.Credit(html, showOnScreen)

积分包含有关如何在屏幕上显示某些内容的署名/学分的数据。
Name Type Default Description
html string 表示 html 代码片段的字符串
showOnScreen boolean false optional 如果为 true,则信用额度将显示在主信用额度容器中。 否则,它将出现在弹出窗口中。所有制作人员名单都以“内联”方式显示,如果您有图像,我们建议您正确调整其大小以匹配文本或使用 css 对其进行“垂直对齐”。
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

制作人员名单内容

showOnScreen : boolean

积分应显示在屏幕上还是灯箱中

Methods

static Cesium.Credit.clone(credit)Credit

复制Credit instance.
Name Type Description
credit Credit optional 要复制的 Credit。
Returns:
一个新的 Credit 实例,该实例与提供的实例重复。(如果信用额度未定义,则返回 undefined)

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

如果积分相等,则返回 true
Name Type Description
left Credit optional The first credit
right Credit optional The second credit
Returns:
true if left and right are equal, false otherwise.

equals(credit)boolean

如果credit相等,则返回 true
Name Type Description
credit Credit optional 要比较的信用。
Returns:
如果 left 和 right 相等,则为 true,否则为 false
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.