Coverage
Wraps a CoverageJSON Coverage object as a Coverage API object.
Constructor Summary
Public Constructor | ||
public |
constructor(covjson: Object, cacheRanges: boolean) |
Member Summary
Public Members | ||
public |
A bounding box array with elements [westLon, southLat, eastLon, northLat].
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
Method Summary
Public Methods | ||
public |
|
|
public |
Returns the requested range data as a Promise.
|
|
public |
loadRanges(paramKeys: iterable): Promise Returns the requested range data as a Promise.
|
Public Constructors
Public Members
Public Methods
public loadRange(paramKey: string): Promise source
Returns the requested range data as a Promise.
Note that this method implicitly loads the domain as well.
Params:
Name | Type | Attribute | Description |
paramKey | string | The key of the Parameter for which to load the range. |
Return:
Promise | A Promise object which loads the requested range data and succeeds with a Range object. |
Example:
cov.loadRange('salinity').then(function (sal) {
// work with Range object
}).catch(function (e) {
// there was an error when loading the range
console.log(e.message)
})
public loadRanges(paramKeys: iterable): Promise source
Returns the requested range data as a Promise.
Note that this method implicitly loads the domain as well.
Params:
Name | Type | Attribute | Description |
paramKeys | iterable |
|
An iterable of parameter keys for which to load the range data. If not given, loads all range data. |
Return:
Promise | A Promise object which loads the requested range data and succeeds with a Map object. |
Example:
cov.loadRanges(['salinity','temp']).then(function (ranges) {
// work with Map object
console.log(ranges.get('salinity').values)
}).catch(function (e) {
// there was an error when loading the range data
console.log(e)
})