TileProviderError

TileProviderError

new

Provides details about an error that occurred in an ImageryProvider or a TerrainProvider.

Parameters:
Name Type Argument Default Description
provider ImageryProvider | TerrainProvider The imagery or terrain provider that experienced the error.
message String A message describing the error.
x Number <optional>
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>
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 <optional>
0 The number of times this operation has been retried.
Source:

Members

:Number

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.

:String

The message describing the error.

:ImageryProvider|TerainProvider

The ImageryProvider or TerrainProvider that experienced the error.

:Boolean

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

:Number

The number of times this operation has been retried.
Default Value:
  • 0

:Number

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.

:Number

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>

Handles 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 and will automatically retry if requested to do so by the event listeners.

Parameters:
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 The imagery or terrain provider that encountered the error.
event Event The event to raise to inform listeners of the error.
message String The message describing the error.
x Number The X coordinate of the tile that experienced the error, or undefined if the error is not specific to a particular tile.
y Number The Y coordinate of the tile that experienced the error, or undefined if the error is not specific to a particular tile.
level Number The level-of-detail of the tile that experienced the error, or undefined if the error is not specific to a particular tile.
retryFunction Function The function to call to retry the operation. If undefined, the operation will not be retried.
Returns:
TileProviderError 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>

Handles 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.

Parameters:
Name Type Description
previousError TileProviderError The previous error, or undefined if this operation has not previously resulted in an error.