Class: ElevationCoverage

ElevationCoverage(resolution)

When used directly and not through a subclass, this class represents an elevation coverage whose elevations are zero at all locations.

Constructor

new ElevationCoverage(resolution)

Constructs an ElevationCoverage
Parameters:
Name Type Description
resolution Number The resolution of the coverage, in degrees. (To compute degrees from meters, divide the number of meters by the globe's radius to obtain radians and convert the result to degrees.)
Source:
Throws:
If the resolution argument is null, undefined, or zero.
Type
ArgumentError

Members

_enabled :Boolean

Indicates whether or not to use this coverage.
Type:
  • Boolean
Default Value:
  • true
Source:

(readonly) coverageSector :Sector

The sector this coverage spans.
Type:
Source:

displayName :String

Indicates this coverage's display name.
Type:
  • String
Default Value:
  • "Coverage"
Source:

resolution :Number

The resolution of this coverage in degrees.
Type:
  • Number
Source:

(readonly) timestamp :Number

Indicates the last time this coverage changed, in milliseconds since midnight Jan 1, 1970.
Type:
  • Number
Default Value:
  • Date.now() at construction
Source:

Methods

elevationAtLocation(latitude, longitude) → {Number}

Returns the elevation at a specified location.
Parameters:
Name Type Description
latitude Number The location's latitude in degrees.
longitude Number The location's longitude in degrees.
Source:
Returns:
The elevation at the specified location, in meters. Returns null if the location is outside the coverage area of this coverage.
Type
Number

elevationsForGrid(sector, numLat, numLon, result) → {Boolean}

Returns the elevations at locations within a specified sector.
Parameters:
Name Type Description
sector Sector The sector for which to determine the elevations.
numLat Number The number of latitudinal sample locations within the sector.
numLon Number The number of longitudinal sample locations within the sector.
result Array.<Number> An array in which to return the requested elevations.
Source:
Throws:
If the specified sector or result array is null or undefined, or if either of the specified numLat or numLon values is less than one.
Type
ArgumentError
Returns:
true if the result array was completely filled with elevation data, false otherwise.
Type
Boolean

minAndMaxElevationsForSector(sector, result) → {Boolean}

Returns the minimum and maximum elevations within a specified sector.
Parameters:
Name Type Description
sector Sector The sector for which to determine extreme elevations.
result Array.<Number> An array in which to return the requested minimum and maximum elevations.
Source:
Throws:
If any argument is null or undefined
Type
ArgumentError
Returns:
true if the coverage completely fills the sector with data, false otherwise.
Type
Boolean