new SuperMapTerrainProvider()
Used to load published terrain services.
| Name | Type | Default | Description |
|---|---|---|---|
options.url |
String |
The URL for the terrain service. |
|
options.proxy |
Proxy |
optional
Service agent. |
|
options.requestVertexNormals |
Boolean | false |
optional
Whether to request normals (for lighting effects), default not to request. |
options.requestWaterMask |
Boolean | false |
optional
Whether to request a water surface marker (for water surface effects), default not requested. |
options.ellipsoid |
Ellipsoid |
optional
Ellipsoid, default is WGS84. |
|
options.credit |
Credit | String |
optional
Service description information. |
|
options.isSct |
Boolean | true |
optional
Is the TIN terrain service published for iServer, with stk terrain set to false. |
options.isShowGlobe |
Boolean |
optional
Whether to exclude invalid terrain areas, default to true (global display). |
|
options.invisibility |
Boolean |
optional
Whether to enable the feature of setting terrain visibility, default is false. |
|
options.packingRequest |
PackingRequest |
optional
Batch request encoding method. |
Example
var terrainProvider = new SuperMap3D.SuperMapTerrainProvider({
url : ‘http://localhost:8090/Terrain’,
requestWaterMask : true,
requestVertexNormals : true,
isSct : true
});
var viewer = new SuperMap3D.Viewer(‘Container’,{
terrainProvider : terrainProvider
});
Members
-
creditCredit
-
Obtain the description information of the terrain service.
-
currentVersionString
-
Retrieve or set the version of the terrain data currently in use. Currently, only tin terrain data is supported.
-
customRequestHeadersObject
-
Custom request header
-
hasVertexNormalsBoolean
-
Retrieve whether the current terrain has vertex normals. Cannot be called before SuperMapTerrainProvider # ready returns TRUE.
-
hasWaterMaskBoolean
-
Used to determine whether the current terrain service includes water surface mask data.
-
readonly historyVersionsString
-
Obtain all historical version information of terrain data. Currently, only tin terrain data is supported.
-
indexedDBSettingObject
-
Get or set whether the terrain's IndexedDB tiles are enabled (not supported by IE browser).
Example
// Set whether to save terrain tiles to the browser's IndexedDB database viewer.terrainProvider.indexedDBSetting.isOpen = true -
isCreateSkirtBoolean
-
Get or set whether to create skirt hem
-
isShowGlobeBoolean
-
Get or set whether to exclude invalid terrain areas (for TIN terrain), default to true, displayed globally.
-
readyBoolean
-
Obtain whether the terrain service is ready.
-
readonly readyPromisePromise.<Boolean>
-
Get the ready state promise object for the terrain service.
-
requestVertexNormalsBoolean
-
Whether to request vertex normals.
-
requestWaterMaskBoolean
-
Do you want to request water surface mask data.
-
subdomainsString
-
Get or set the subdomain name. This interface allows you to request data from a specified subdomain.
-
tilingSchemeGeographicTilingScheme
-
Obtain the projection object (latitude and longitude or Mercator projection) of the terrain service.
-
visibleBoolean
-
Get or set whether the terrain is visible. By using this interface, it is possible to set the visibility of terrain without refreshing the Earth. It is necessary to set invisibility to true when creating SuperMapTerrainProvider. Only terrain data published by iServer supports explicit and implicit support.
Example
var viewer = new SuperMap3D.Viewer('Container',{ // Create an instance of a terrain service provider with the URL of TIN terrain service published by SuperMap iServer terrainProvider : new SuperMap3D.SuperMapTerrainProvider({ url : URL_CONFIG.SiChuan_TERRAIN, isSct : true,// When the terrain service originates from SuperMap iServer, isSct must be set to true invisibility:true// When hiding terrain, invisibility must be set to true }), }); // Add an imagery service published by SuperMap iServer var layer = viewer.imageryLayers.addImageryProvider(new SuperMap3D.SuperMapImageryProvider({ url : URL_CONFIG.SiChuan_IMG }));
Methods
-
getLevelMaximumGeometricError(level){Number}
-
Obtain the maximum geometric error for this level.
Name Type Description levelNumber Tile level.
Returns:
Type Description Number Maximum geometric error. -
getTileDataAvailable(x, y, level){Boolean}
-
Obtain whether the tile data corresponding to x y levels is available.
Name Type Description xNumber The x-coordinate.
yNumber Y-coordinate.
levelNumber Tile level.
Returns:
Type Description Boolean Is it available.