| Name | Type | Default | Description |
|---|---|---|---|
html |
string | 表示 html 代码片段的字符串 | |
showOnScreen |
boolean |
false
|
optional 如果为 true,credit 将在主 credit 容器中可见。否则,它将显示在一个弹出框中。所有 credit 都以 `inline` 方式显示,如果你有图像,我们建议将其尺寸调整为与文字匹配,或使用 css 的 `vertical-align` 来对齐。 |
Throws:
-
DeveloperError :html 是必需的。
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
获取 credit 元素
credit 的内容
credit 是显示在屏幕上还是在灯箱中显示
Methods
static Cesium.Credit.clone(credit) → Credit
复制一个 Credit 实例。
| Name | Type | Description |
|---|---|---|
credit |
Credit | optional 要复制的 Credit。 |
Returns:
所提供的 Credit 的一个副本新实例。(如果 credit 为 undefined 则返回 undefined)
如果 credits 相等则返回 true
| Name | Type | Description |
|---|---|---|
left |
Credit | optional 第一个 credit |
right |
Credit | optional 第二个 credit |
Returns:
true 如果 left 和 right 相等,false 否则。
如果 credits 相等则返回 true
| Name | Type | Description |
|---|---|---|
credit |
Credit | optional 要与之比较的 credit。 |
Returns:
true 如果 left 和 right 相等,false 否则。
