GoogleEarthEnterpriseMapsProvider

new Cesium.GoogleEarthEnterpriseMapsProvider(options)

要构造 GoogleEarthEnterpriseMapsProvider,请调用 GoogleEarthEnterpriseImageryProvider.fromUrl。请勿直接调用构造函数。
Provides tiled imagery using the Google Earth Imagery API. Notes: This imagery provider does not work with the public Google Earth servers. It works with the Google Earth Enterprise Server. By default the Google Earth Enterprise server does not set the Cross-Origin Resource Sharing headers. You can either use a proxy server which adds these headers, or in the /opt/google/gehttpd/conf/gehttpd.conf and add the 'Header set Access-Control-Allow-Origin "*"' option to the '<Directory />' and '<Directory "/opt/google/gehttpd/htdocs">' directives. This provider is for use with 2D Maps API as part of Google Earth Enterprise. For 3D Earth API uses, it is necessary to use GoogleEarthEnterpriseImageryProvider
Name Type Description
options GoogleEarthEnterpriseMapsProvider.ConstructorOptions 描述初始化选项的对象
Throws:
  • RuntimeError :找不到通道(id)为 options.channel 的图层。
  • RuntimeError :在通道(id)options.channel 中找不到版本。
  • RuntimeError :不支持的投影 data.projection
示例:
const google = await Cesium.GoogleEarthEnterpriseMapsProvider.fromUrl("https://earth.localdomain", 1008);
See:

Members

static Cesium.GoogleEarthEnterpriseMapsProvider.logoUrl : string

获取或设置用于在版权信息中显示的 Google Earth 徽标 URL。
获取当前正在使用的影像通道(id)。
获取此影像提供方处于活动状态时要显示的版权信息。通常这用于标注影像的来源。
获取当影像提供方遇到异步错误时触发的事件。通过订阅该事件,您将收到错误通知,并可能从中恢复。事件监听器会接收到一个 TileProviderError 实例。
获取一个值,指示此影像提供方提供的图像是否包含 alpha 通道。如果此属性为 false,则存在的 alpha 通道将被忽略。如果此属性为 true,则任何没有 alpha 通道的图像将被视为其 alpha 在所有位置均为 1.0。当此属性为 false 时,内存占用和纹理上传时间会减少。

readonly maximumLevel : number|undefined

获取可以请求的最大细节级别。
获取可以请求的最小细节级别。
获取 Google Earth 服务器上数据的 URL 路径。
获取此提供方使用的代理。
获取此实例提供的影像的矩形范围(以弧度表示)。
获取正从提供方请求的数据类型。
获取瓦片丢弃策略。如果不为 undefined,则该丢弃策略负责通过其 shouldDiscardImage 函数过滤掉 "missing" 瓦片。如果该函数返回 undefined,则不会过滤任何瓦片。
获取每个瓦片的高度(以像素为单位)。
获取每个瓦片的宽度(以像素为单位)。
获取此提供方使用的瓦片方案。
获取 Google Earth MapServer 的 URL。
获取此提供方使用的数据版本。

Methods

static Cesium.GoogleEarthEnterpriseMapsProvider.fromUrl(url, options)Promise.<GoogleEarthEnterpriseMapsProvider>

使用 Google Earth 影像 API 创建一个分块影像提供方。
Name Type Description
url Resource | string 托管影像的 Google Earth 服务器的 URL。
options GoogleEarthEnterpriseMapsProvider.ConstructorOptions optional 描述初始化选项的对象
Returns:
已创建的 GoogleEarthEnterpriseMapsProvider。
Throws:
  • RuntimeError :找不到通道(id)为 options.channel 的图层。
  • RuntimeError :在通道(id)options.channel 中找不到版本。
  • RuntimeError :不支持的投影 data.projection
示例:
const google = await Cesium.GoogleEarthEnterpriseMapsProvider.fromUrl("https://earth.localdomain", 1008);
获取在显示给定瓦片时要显示的版权信息。
Name Type Description
x number 瓦片的 X 坐标。
y number 瓦片的 Y 坐标。
level number 瓦片级别;
Returns:
在显示瓦片时要显示的版权信息。

pickFeatures(x, y, level, longitude, latitude)undefined

此影像提供方目前不支持拾取要素,因此此函数直接返回 undefined。
Name Type Description
x number 瓦片的 X 坐标。
y number 瓦片的 Y 坐标。
level number 瓦片级别。
longitude number 用于拾取要素的经度。
latitude number 用于拾取要素的纬度。
Returns:
由于不支持拾取,因此为 undefined。

requestImage(x, y, level, request)Promise.<ImageryTypes>|undefined

请求给定瓦片的图像。
Name Type Description
x number 瓦片的 X 坐标。
y number 瓦片的 Y 坐标。
level number 瓦片级别。
request Request optional 请求对象。仅供内部使用。
Returns:
图像的 Promise,在图像可用时 resolve;如果到服务器的活动请求过多,则返回 undefined,稍后应重试该请求。

Type Definitions

Cesium.GoogleEarthEnterpriseMapsProvider.ConstructorOptions

GoogleEarthEnterpriseMapsProvider 构造函数的初始化选项
Properties:
Name Type Attributes Default Description
channel number 从服务器请求数据时要使用的通道(id)。 可以通过查看位于以下位置的 json 文件找到通道号: earth.localdomain/default_map/query?request=Json&vars=geeServerDefs /default_map 路径可能 因您的 Google Earth Enterprise 服务器配置而异。 查找与 "ImageryMaps" requestType 关联的 "id"。可能有一个以上的 id 可用。 示例: { layers: [ { id: 1002, requestType: "ImageryMaps" }, { id: 1007, requestType: "VectorMapsRaster" } ] }
path string <optional>
"/default_map" 托管影像的 Google Earth 服务器的路径。
maximumLevel number <optional>
Google Earth Enterprise 服务器支持的最大细节级别;如果没有限制则为 undefined。
tileDiscardPolicy TileDiscardPolicy <optional>
判断瓦片无效且应被丢弃的策略。为确保不丢弃任何瓦片,请构造并传入一个 NeverTileDiscardPolicy 作为此参数。
ellipsoid Ellipsoid <optional>
Ellipsoid.default 椭球体。如果未指定,则使用默认椭球体。
需要帮助?获取答案的最快方式是在 Cesium 论坛 上向社区和团队提问。