English中文

TileProviderError

new Cesium.TileProviderError(provider, message, x, y, level, timesRetried, error)

提供有关发生在 Provides details about an error that occurred in an ImageryProvider 或一个 or a TerrainProvider.
名称 Name 类型 Type 默认值 Default 说明 Description
provider ImageryProvider | TerrainProvider 遇到错误的图像或地形提供者。 The imagery or terrain provider that experienced the error.
message string 描述错误的消息。 A message describing the error.
x number 可选 optional 遇到错误的图块的 X 坐标,如果错误不是特定于特定图块,则未定义。 The X coordinate of the tile that experienced the error, or undefined if the error is not specific to a particular tile.
y number 可选 optional 遇到错误的图块的 Y 坐标,如果错误不是特定于特定图块,则未定义。 The Y coordinate of the tile that experienced the error, or undefined if the error is not specific to a particular tile.
level number 可选 optional 遇到错误的图块的级别,如果错误不是特定于特定图块,则为未定义。 The level of the tile that experienced the error, or undefined if the error is not specific to a particular tile.
timesRetried number 0 可选 optional 此操作已重试的次数。 The number of times this operation has been retried.
error Error 可选 optional 发生的错误或异常(如果有)。 The error or exception that occurred, if any.

成员 Members

发生的错误或异常(如果有)。 The error or exception that occurred, if any.
遇到错误的图块的详细程度。如果错误不是特定于特定图块,则该属性将是未定义的。 The level-of-detail of the tile that experienced the error. If the error is not specific to a particular tile, this property will be undefined.
描述错误的消息。 The message describing the error.
The ImageryProvider or TerrainProvider 经历了错误。 that experienced the error.
如果应重试失败的操作,则为 True;否则为假。图像或地形提供者将在引发事件之前设置此属性的初始值,但任何侦听器都可以更改它。将根据调用最后一个侦听器后的值进行操作。 True if the failed operation should be retried; otherwise, false. The imagery or terrain provider will set the initial value of this property before raising the event, but any listeners can change it. The value after the last listener is invoked will be acted upon.
默认值: Default Value: false
此操作已重试的次数。 The number of times this operation has been retried.
默认值: Default Value: 0
出现错误的图块的 X 坐标。如果错误不是特定于特定图块,则该属性将是未定义的。 The X coordinate of the tile that experienced the error. If the error is not specific to a particular tile, this property will be undefined.
出现错误的图块的 Y 坐标。如果错误不是特定于特定图块,则该属性将是未定义的。 The Y coordinate of the tile that experienced the error. If the error is not specific to a particular tile, this property will be undefined.

方法 Methods

static Cesium.TileProviderError.reportError(previousError, provider, event, message, x, y, level, errorDetails)TileProviderError

报告一个错误 Reports an error in an ImageryProvider or TerrainProvider 如果事件有任何侦听器,则引发事件;如果事件没有侦听器,则将错误记录到控制台。此方法还跟踪重试操作的次数。 by raising an event if it has any listeners, or by logging the error to the console if the event has no listeners. This method also tracks the number of times the operation has been retried.
名称 Name 类型 Type 说明 Description
previousError TileProviderError 上次为此错误调用此函数时返回的错误实例,如果这是第一次发生此错误,则返回未定义的错误实例。 The error instance returned by this function the last time it was called for this error, or undefined if this is the first time this error has occurred.
provider ImageryProvider | TerrainProvider 可选 optional 遇到错误的图像或地形提供者。 The imagery or terrain provider that encountered the error.
event Event 可选 optional 引发以通知侦听器错误的事件。 The event to raise to inform listeners of the error.
message string 可选 optional 描述错误的消息。 The message describing the error.
x number 可选 optional 遇到错误的图块的 X 坐标,如果错误不是特定于特定图块,则未定义。 The X coordinate of the tile that experienced the error, or undefined if the error is not specific to a particular tile.
y number 可选 optional 遇到错误的图块的 Y 坐标,如果错误不是特定于特定图块,则未定义。 The Y coordinate of the tile that experienced the error, or undefined if the error is not specific to a particular tile.
level number 可选 optional 遇到错误的图块的详细程度,如果错误不是特定于特定图块,则未定义。 The level-of-detail of the tile that experienced the error, or undefined if the error is not specific to a particular tile.
errorDetails Error 可选 optional 发生的错误或异常(如果有)。 The error or exception that occurred, if any.
返回: Returns:
传递给事件侦听器的错误实例,并且应该在下次针对相同错误调用该函数时传递给该函数,以便跟踪重试计数。 The error instance that was passed to the event listeners and that should be passed to this function the next time it is called for the same error in order to track retry counts.

static Cesium.TileProviderError.reportSuccess(previousError)

通过重置先前错误的重试计数(如果有)来报告操作成功。这样,如果将来再次发生错误,听众将被告知尚未重试。 Reports success of an operation by resetting the retry count of a previous error, if any. This way, if the error occurs again in the future, the listeners will be informed that it has not yet been retried.
名称 Name 类型 Type 说明 Description
previousError TileProviderError 先前的错误,如果此操作先前未导致错误,则为未定义。 The previous error, or undefined if this operation has not previously resulted in an error.

类型定义 Type Definitions

Cesium.TileProviderError.RetryFunction()

将调用重试操作的函数。 A function that will be called to retry the operation.
需要帮助吗?获得答案的最快方法是从社区和团队那里获得答案 Need help? The fastest way to get answers is from the community and team on the Cesium Forum.