RgbTerrain

new RgbTerrain(nameopt, optionsopt, equalizeNormalsopt, keyopt, imageSizeopt, minHeightopt, resolutionopt)

Parameters:
NameTypeAttributesDefaultDescription
namestring<optional>
""

Terrain provider name.

optionsIRgbTerrainParams<optional>
equalizeNormalsboolean<optional>
true

Make normal equalization on the edges of the tiles.

keystring<optional>
""

API key.

imageSizenumber<optional>
256

Image size.

minHeightnumber<optional>
-10000

Minimal height for rgb to height converter.

resolutionnumber<optional>
0.1

Height converter resolution.

Extends

Methods

(protected) _applyElevationsData()

_createHeights() → {Array.<number>}

Converts loaded data to segment elevation data type(column major elevation data array in meters)

Returns:
Type: 
Array.<number>

(protected) _createUrl(segment) → {string}

Creates default query url string.

Parameters:
NameTypeDescription
segmentSegment
Returns:
Type: 
string

(protected) _getHTTPRequestString(segment) → {string}

Returns actual url query string.

Parameters:
NameTypeDescription
segmentSegment

Segment that loads image data.

Returns:
  • Url string.
Type: 
string

abortLoading()

Stop loading.

loadTerrain(segment, forceLoadingopt)

Starts to load segment elevation data.

Parameters:
NameTypeAttributesDefaultDescription
segmentSegment

Segment that wants a terrain data.

forceLoadingboolean<optional>
false

setName(name)

Sets provider name.

Parameters:
NameTypeDescription
namestring

Name.

setUrl(url)

Sets terrain data url template.

Parameters:
NameTypeDescription
urlstring

Url template.

Example
<caption>Default openglobus url template:</caption>:
"http://earth3.openglobus.org/{z}/{y}/{x}.ddm"

setUrlRewriteCallback(ur)

Sets url rewrite callback, used for custom url rewriting for every tile loading.

Parameters:
NameTypeDescription
urUrlRewriteFunc

The callback that returns tile custom created url.