English中文

Credit

new Cesium.Credit(html, showOnScreen)

片尾字幕包含有关如何在屏幕上显示某些内容的属性/片尾字幕的数据。 A credit contains data pertaining to how to display attributions/credits for certain content on the screen.
名称 Name 类型 Type 默认值 Default 说明 Description
html string 代表 html 代码片段的字符串 An string representing an html code snippet
showOnScreen boolean false 可选 optional 如果为 true,则信用将在主信用容器中可见。否则,它将出现在弹出窗口中。所有制作人员都以“内联”方式显示,如果您有图像,我们建议正确调整其大小以匹配文本或使用 css 对其进行“垂直对齐”。 If true, the credit will be visible in the main credit container. Otherwise, it will appear in a popover. All credits are displayed `inline`, if you have an image we recommend sizing it correctly to match the text or use css to `vertical-align` it.
抛出: 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

获取信用元素 Gets the credit element

readonly html : string

信用内容 The credit content

showOnScreen : boolean

片尾字幕是否应显示在屏幕上或灯箱中 Whether the credit should be displayed on screen or in a lightbox

方法 Methods

static Cesium.Credit.clone(credit)Credit

Duplicates a Credit instance.
名称 Name 类型 Type 说明 Description
credit Credit 可选 optional 要复制的信用。 The Credit to duplicate.
返回: Returns:
一个新的 Credit 实例,与所提供的实例重复。 (如果信用未定义,则返回未定义) A new Credit instance that is a duplicate of the one provided. (Returns undefined if the credit is undefined)

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

如果学分相等则返回 true Returns true if the credits are equal
名称 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

如果学分相等则返回 true Returns true if the credits are equal
名称 Name 类型 Type 说明 Description
credit Credit 可选 optional 进行比较的信用。 The credit to compare to.
返回: Returns:
true 如果左和右相等, if left and right are equal, false otherwise.
需要帮助吗?获得答案的最快方法是从社区和团队那里获得答案 Need help? The fastest way to get answers is from the community and team on the Cesium Forum.