new GlobusTerrain(nameopt, optionsopt, gridSizeByZoomopt, heightFactoropt)
Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name | string | <optional> | "" | Terrain provider name. | |||||||||||||||||||||||||||||||||||||||||||||
options | IGlobusTerrainParams | <optional> | Provider options: Properties
| ||||||||||||||||||||||||||||||||||||||||||||||
gridSizeByZoom | Array.<number> | <optional> | Array of values, where each value corresponds to the size of a tile(or segment) on the globe. Each value must be power of two. | ||||||||||||||||||||||||||||||||||||||||||||||
heightFactor | number | <optional> | 1 | Elevation height multiplier. |
- Deprecated
- Use GlobusRgbTerrain Class that loads segment elevation data, converts it to the array and passes it to the planet segment.
- Source
- GlobusTerrainEvents#event:load
- GlobusTerrainEvents#event:loadend
Extends
Methods
(protected) _applyElevationsData()
- Overrides
- Source
_createHeights() → {Array.<number>}
Converts loaded data to segment elevation data type(column major elevation data array in meters)
- Overrides
- Source
- Type:
- Array.<number>
(protected) _createUrl(segment) → {string}
Creates default query url string.
Name | Type | Description |
---|---|---|
segment | Segment |
- Overrides
- Source
- Type:
- string
(protected) _getHTTPRequestString(segment) → {string}
Returns actual url query string.
Name | Type | Description |
---|---|---|
segment | Segment | Segment that loads image data. |
- Overrides
- Source
- Url string.
- Type:
- string
abortLoading()
Stop loading.
- Overrides
- Source
loadTerrain(segment, forceLoadingopt)
Starts to load segment elevation data.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
segment | Segment | Segment that wants a terrain data. | ||
forceLoading | boolean | <optional> | false |
- Overrides
- Source
setName(name)
Sets provider name.
Name | Type | Description |
---|---|---|
name | string | Name. |
- Overrides
- Source
setUrl(url)
Sets terrain data url template.
Name | Type | Description |
---|---|---|
url | string | Url template. |
- Overrides
- Source
<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.
Name | Type | Description |
---|---|---|
ur | UrlRewriteFunc | The callback that returns tile custom created url. |
- Overrides
- Source