Class: VRTheWorldTerrainProvider

VRTheWorldTerrainProvider

new VRTheWorldTerrainProvider()

TerrainProvider is an interface used to obtain altitude maps from the VT M Ä K VR TheWorld server and generate terrain geometry. By gridding the altitude maps obtained from the VT M Ä K VR TheWorld server, terrain geometry is generated.

Name Type Default Description
options.url String

The URL of VR TheWorld TileMap.

options.proxy Object optional

Proxy used for requests. If necessary, the object should have a getURL function to return the proxy URL.

options.ellipsoid Ellipsoid Ellipsoid.WGS84 optional

Elliptical surface. If this parameter is not specified, use WGS84 ellipsoid.

options.credit Credit | String optional

The credit identifier of the data source is displayed on the canvas.

See:
Example
var terrainProvider = new SuperMap3D.VRTheWorldTerrainProvider({
  url : 'https://www.vr-theworld.com/vr-theworld/tiles1.0.0/73/'
});
viewer.terrainProvider = terrainProvider;

Members

creditCredit

Obtain the copyright statement displayed when the terrain provider is activated. Usually, this will be used to add points to the terrain source. This function should not be called before VRTheWorldTerrainProvider # ready returns true.

errorEventEvent

Retrieve the events triggered when the terrain provider encounters asynchronous errors. By subscribing to this event, you will receive error notifications and may potentially recover from them. The event listener will receive an instance of TileProviderError.

hasVertexNormalsBoolean

Obtain a value indicating whether the requested tile contains vertex normals. This function should not be called until VRTheWorldTerrainProvider # ready returns true.

hasWaterMaskBoolean

Retrieve whether the provider contains water surface mask data. The water surface mask represents which areas on Earth are water bodies rather than land, so it can be rendered as a reflective surface with animated waves. This function should not be called before VRTheWorldTerrainProvider # ready returns true.

readyBoolean

Get a value indicating whether the provider can be used.

readonly readyPromisePromise.<Boolean>

Get the Promise that parses to true when the provider is ready.

Obtain the slicing scheme used by this provider. This function should not be called before VRTheWorldTerrainProvider # ready returns true.

Methods

getLevelMaximumGeometricError(level){Number}

Obtain the maximum geometric error allowed for tiles at a given level.

Name Type Description
level Number

Obtain the tile level with the maximum geometric error.

Returns:
Type Description
Number Maximum geometric error.

getTileDataAvailable(x, y, level){Boolean}

Determine if data for tiles can be loaded.

Name Type Description
x Number

Request the X coordinate of the tile of the geometry.

y Number

Request the y-coordinate of the tile of the geometry.

level Number

Request the level of tiles for the geometry.

Returns:
Type Description
Boolean If not supported, undefined; otherwise, true or false.

requestTileGeometry(x, y, level, request){Promise.<TerrainData>|undefined}

Request the geometry of the given tile. This function should not be called before VRTheWorldTerrainProvider # ready returns true. The results include terrain data and indicate that all sub tiles are available.

Name Type Description
x Number

Request the X coordinate of the tile of the geometry.

y Number

Request the y-coordinate of the tile of the geometry.

level Number

Request the level of tiles for the geometry.

request Request optional

Request object. For internal use only.

Returns:
Type Description
Promise.<TerrainData> | undefined Promise of the requested geometry. If this method returns undefined instead of Promise, it indicates that there are too many requests waiting to be processed and the requests will be retried later.