一个包含所有被信任的服务器的单子. 全权证书将随 向这些服务器提出任何请求.
See:

Methods

static Cesium.TrustedServers.add(host, port)

向注册处添加信任的服务器
Name Type Description
host string 宿主拟加.
port number 该端口曾用于访问主机.
Example:
// Add a trusted server
TrustedServers.add('my.server.com', 80);

static Cesium.TrustedServers.clear()

清除注册
Example:
// Remove a trusted server
TrustedServers.clear();

static Cesium.TrustedServers.contains(url)boolean

测试服务器是否可信 。 如果包含在url中,则服务器必须是与端口一起添加的.
Name Type Description
url string 要根据信任列表测试的url
Returns:
如果 URL 被信任, 返回为真, 否则是假的 .
Example:
// Add server
TrustedServers.add('my.server.com', 81);

// Check if server is trusted
if (TrustedServers.contains('https://my.server.com:81/path/to/file.png')) {
    // my.server.com:81 is trusted
}
if (TrustedServers.contains('https://my.server.com/path/to/file.png')) {
    // my.server.com isn't trusted
}

static Cesium.TrustedServers.remove(host, port)

从注册处删除信任的服务器
Name Type Description
host string 将取之宿者.
port number 该端口曾用于访问主机.
Example:
// Remove a trusted server
TrustedServers.remove('my.server.com', 80);
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.