信用显示负责在屏幕上显示信用.
| Name | Type | Default | Description |
|---|---|---|---|
container |
HTMLElement | 显示入计量的 NT% 0 元素 | |
delimiter |
string |
'''
|
optional 将文本信用分拆的字符串 |
viewport |
HTMLElement |
document.body
|
optional The HTML element that will contain the credits popup |
Examples:
// Add a credit with a tooltip, image and link to display onscreen
const credit = new Cesium.Credit(`<a href="https://cesium.com/" target="_blank"><img src="/images/cesium_logo.png" title="Cesium"/></a>`, true);
viewer.creditDisplay.addStaticCredit(credit);
// Add a credit with a plaintext link to display in the lightbox
const credit = new Cesium.Credit('<a href="https://cesium.com/" target="_blank">Cesium</a>');
viewer.creditDisplay.addStaticCredit(credit);
Members
static Cesium.CreditDisplay.cesiumCredit : Credit
获得或设置 NT 0 标志信用.
将显示入计量的 HTML 元素 .
Methods
Adds a
Credit that will show on screen or in the lightbox until
下一个框。 这主要用于内部使用. 使用 CreditDisplay.addStaticCredit 在屏幕上添加持续信用.
| Name | Type | Description |
|---|---|---|
credit |
Credit | 下一帧显示的功劳 . |
- CreditDisplay.addStaticCredit
See:
Adds a
Credit that will show on screen or in the lightbox until removed with CreditDisplay.removeStaticCredit.
| Name | Type | Description |
|---|---|---|
credit |
Credit | 增加的功劳 |
Examples:
// Add a credit with a tooltip, image and link to display onscreen
const credit = new Cesium.Credit(`<a href="https://cesium.com/" target="_blank"><img src="/images/cesium_logo.png" title="Cesium"/></a>`, true);
viewer.creditDisplay.addStaticCredit(credit);
// Add a credit with a plaintext link to display in the lightbox
const credit = new Cesium.Credit('<a href="https://cesium.com/" target="_blank">Cesium</a>');
viewer.creditDisplay.addStaticCredit(credit);
将信用显示重置为帧状态的开始, 清除当前信用 .
摧毁此对象所持有的资源。 摧毁一个对象可以确定
释放资源,而不是依赖垃圾收集器来摧毁此对象.
Once an object is destroyed, it should not be used; calling any function other than
Once an object is destroyed, it should not be used; calling any function other than
isDestroyed will result in a DeveloperError exception. Therefore,
assign the return value (undefined) to the object as done in the example.
Throws:
-
DeveloperError : This object was destroyed, i.e., destroy() was called.
将信用显示设置为帧状态的结束,在信用容器中显示最后一个帧的信用.
如果此对象被销毁, 返回真实; 否则, 错误 .
Returns:
true if this object was destroyed; otherwise, false.
删除屏幕或灯盒中显示的静态信用.
| Name | Type | Description |
|---|---|---|
credit |
Credit | 所取功德. |
在新建框架之前更新信用显示 .