Class: Level

Level(sector, levelZeroDelta, numLevels, tileWidth, tileHeight)

Represents a multi-resolution, hierarchical collection of tiles. Applications typically do not interact with this class.

Constructor

new Level(sector, levelZeroDelta, numLevels, tileWidth, tileHeight)

Constructs a level set.
Parameters:
Name Type Description
sector Sector The sector spanned by this level set.
levelZeroDelta Location The geographic size of tiles in the lowest resolution level of this level set.
numLevels Number The number of levels in the level set.
tileWidth Number The height in pixels of images associated with tiles in this level set, or the number of sample points in the longitudinal direction of elevation tiles associate with this level set.
tileHeight Number The height in pixels of images associated with tiles in this level set, or the number of sample points in the latitudinal direction of elevation tiles associate with this level set.
Source:
Throws:
If the specified sector or level-zero-delta is null or undefined, the level zero delta values are less than or equal to zero, or any of the number-of-levels, tile-width or tile-height arguments are less than 1.
Type
ArgumentError

Members

levelNumber :Number

The level's ordinal in its parent level set.
Type:
  • Number
Source:

(readonly) levelZeroDelta :Location

The geographic size of the lowest resolution (level 0) tiles in this level set.
Type:
Source:

(readonly) numLevels :Number

The number of levels in this level set.
Type:
  • Number
Source:

parent :LevelSet

The level set that this level is a member of.
Type:
  • LevelSet
Source:

(readonly) sector :Sector

The sector spanned by this level set.
Type:
Source:

sector :Sector

The sector spanned by this level.
Type:
Source:

texelSize :Number

The size of pixels or elevation cells within this level, in radians per pixel or per cell.
Type:
  • Number
Source:

tileDelta :Location

The geographic size of tiles within this level.
Type:
Source:

tileHeight :Number

The height in pixels or cells of the resource associated with tiles within this level.
Type:
  • Number
Source:

(readonly) tileHeight :Number

The height in pixels of images associated with tiles in this level set, or the number of sample points in the latitudinal direction of elevation tiles associated with this level set.
Type:
  • Number
Source:

tileWidth :Number

The width in pixels or cells of the resource associated with tiles within this level.
Type:
  • Number
Source:

(readonly) tileWidth :Number

The width in pixels of images associated with tiles in this level set, or the number of sample points in the longitudinal direction of elevation tiles associated with this level set.
Type:
  • Number
Source:

Methods

compare(that) → {Number}

Compare this level's ordinal to that of a specified level.
Parameters:
Name Type Description
that Level The level to compare this one to.
Source:
Throws:
If the specified level is null or undefined.
Type
ArgumentError
Returns:
0 if the two ordinals are equivalent. -1 if this level's ordinal is less than the specified level's ordinal. 1 if this level's ordinal is greater than the specified level's ordinal.
Type
Number

firstLevel() → {Level}

Returns the first (lowest resolution) level of this level set.
Source:
Returns:
The first level of this level set.
Type
Level

isFirstLevel() → {Boolean}

Indicates whether this level is the lowest resolution level (level 0) within its parent's level set.
Source:
Returns:
true If this tile is the lowest resolution in the parent level set, otherwise false.
Type
Boolean

isLastLevel() → {Boolean}

Indicates whether this level is the highest resolution level within its parent's level set.
Source:
Returns:
true If this tile is the highest resolution in the parent level set, otherwise false.
Type
Boolean

lastLevel() → {Level}

Returns the last (highest resolution) level of this level set.
Source:
Returns:
The last level of this level set.
Type
Level

level(levelNumber) → {Level}

Returns the Level for a specified level number.
Parameters:
Name Type Description
levelNumber Number The number of the desired level.
Source:
Returns:
The requested level, or null if the level does not exist.
Type
Level

levelForTexelSize(texelSize)

Returns the level with a specified texel size. This function returns the first level if the specified texel size is greater than the first level's texel size, and returns the last level if the delta is less than the last level's texel size.
Parameters:
Name Type Description
texelSize Number The size of pixels or elevation cells in the level, in radians per pixel or cell.
Source:

nextLevel() → {Level}

Returns the level whose ordinal occurs immediately after this level's ordinal in the parent level set, or null if this is the last level.
Source:
Returns:
The next level, or null if this is the last level.
Type
Level

previousLevel() → {Level}

Returns the level whose ordinal occurs immediately before this level's ordinal in the parent level set, or null if this is the fist level.
Source:
Returns:
The previous level, or null if this is the first level.
Type
Level

Level()

Represents a level in a tile pyramid.

Constructor

new Level()

Constructs a Level within a LevelSet. Applications typically do not interact with this class.
Source:
Throws:
If either the specified tile delta or parent level set is null or undefined.
Type
ArgumentError

Members

levelNumber :Number

The level's ordinal in its parent level set.
Type:
  • Number
Source:

(readonly) levelZeroDelta :Location

The geographic size of the lowest resolution (level 0) tiles in this level set.
Type:
Source:

(readonly) numLevels :Number

The number of levels in this level set.
Type:
  • Number
Source:

parent :LevelSet

The level set that this level is a member of.
Type:
  • LevelSet
Source:

(readonly) sector :Sector

The sector spanned by this level set.
Type:
Source:

sector :Sector

The sector spanned by this level.
Type:
Source:

texelSize :Number

The size of pixels or elevation cells within this level, in radians per pixel or per cell.
Type:
  • Number
Source:

tileDelta :Location

The geographic size of tiles within this level.
Type:
Source:

tileHeight :Number

The height in pixels or cells of the resource associated with tiles within this level.
Type:
  • Number
Source:

(readonly) tileHeight :Number

The height in pixels of images associated with tiles in this level set, or the number of sample points in the latitudinal direction of elevation tiles associated with this level set.
Type:
  • Number
Source:

tileWidth :Number

The width in pixels or cells of the resource associated with tiles within this level.
Type:
  • Number
Source:

(readonly) tileWidth :Number

The width in pixels of images associated with tiles in this level set, or the number of sample points in the longitudinal direction of elevation tiles associated with this level set.
Type:
  • Number
Source:

Methods

compare(that) → {Number}

Compare this level's ordinal to that of a specified level.
Parameters:
Name Type Description
that Level The level to compare this one to.
Source:
Throws:
If the specified level is null or undefined.
Type
ArgumentError
Returns:
0 if the two ordinals are equivalent. -1 if this level's ordinal is less than the specified level's ordinal. 1 if this level's ordinal is greater than the specified level's ordinal.
Type
Number

firstLevel() → {Level}

Returns the first (lowest resolution) level of this level set.
Source:
Returns:
The first level of this level set.
Type
Level

isFirstLevel() → {Boolean}

Indicates whether this level is the lowest resolution level (level 0) within its parent's level set.
Source:
Returns:
true If this tile is the lowest resolution in the parent level set, otherwise false.
Type
Boolean

isLastLevel() → {Boolean}

Indicates whether this level is the highest resolution level within its parent's level set.
Source:
Returns:
true If this tile is the highest resolution in the parent level set, otherwise false.
Type
Boolean

lastLevel() → {Level}

Returns the last (highest resolution) level of this level set.
Source:
Returns:
The last level of this level set.
Type
Level

level(levelNumber) → {Level}

Returns the Level for a specified level number.
Parameters:
Name Type Description
levelNumber Number The number of the desired level.
Source:
Returns:
The requested level, or null if the level does not exist.
Type
Level

levelForTexelSize(texelSize)

Returns the level with a specified texel size. This function returns the first level if the specified texel size is greater than the first level's texel size, and returns the last level if the delta is less than the last level's texel size.
Parameters:
Name Type Description
texelSize Number The size of pixels or elevation cells in the level, in radians per pixel or cell.
Source:

nextLevel() → {Level}

Returns the level whose ordinal occurs immediately after this level's ordinal in the parent level set, or null if this is the last level.
Source:
Returns:
The next level, or null if this is the last level.
Type
Level

previousLevel() → {Level}

Returns the level whose ordinal occurs immediately before this level's ordinal in the parent level set, or null if this is the fist level.
Source:
Returns:
The previous level, or null if this is the first level.
Type
Level