Credit

包含有关如何在屏幕上显示特定内容的归属/署名的数据。

new Cesium.Credit(html, showOnScreen)

Name Type Default Description
html string 表示HTML代码片段的字符串
showOnScreen boolean false optional 如果为true,署名将在主署名容器中可见。否则,它将出现在弹出框中。所有署名都以内联方式显示,如果有图像,建议正确调整其大小以匹配文本或使用css进行`vertical-align`。
Throws:
Example:
// 创建带有工具提示、图像和链接的署名
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

获取署名元素

readonly html : string

署名内容

showOnScreen : boolean

署名应该显示在屏幕上还是灯箱中

Methods

static Cesium.Credit.clone(credit)Credit

复制Credit实例。
Name Type Description
credit Credit optional 要复制的Credit。
Returns:
与提供实例相同的新Credit实例。(如果credit未定义则返回undefined)

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

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

equals(credit)boolean

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