Class: BMNGRestLayer

BMNGRestLayer(serverAddress, pathToData, displayName, initialTime)

Represents the 12 month collection of Blue Marble Next Generation imagery for the year 2004. By default the month of January is displayed, but this can be changed by setting this class' time property to indicate the month to display.

Constructor

new BMNGRestLayer(serverAddress, pathToData, displayName, initialTime)

Constructs a Blue Marble layer.
Parameters:
Name Type Description
serverAddress String The server address of the tile service. May be null, in which case the current origin is used (see window.location).
pathToData String The path to the data directory relative to the specified server address. May be null, in which case the server address is assumed to be the full path to the data directory.
displayName String The display name to assign this layer. Defaults to "Blue Marble" if null or undefined.
initialTime Date A date value indicating the month to display. The nearest month to the specified time is displayed. January is displayed if this argument is null or undefined, i.e., new Date("2004-01"); See RestTiledImageLayer for a description of its contents. May be null, in which case default values are used.
Source:

Extends

Members

(static, readonly) availableTimes :Array.<Date>

Indicates the available times for this layer.
Type:
  • Array.<Date>
Source:

displayName :String

This layer's display name.
Type:
  • String
Inherited From:
Default Value:
  • "Layer"
Source:

enabled :Boolean

Indicates whether to display this layer.
Type:
  • Boolean
Inherited From:
Default Value:
  • true
Source:

(readonly) inCurrentFrame :Boolean

Indicates whether elements of this layer were drawn in the most recently generated frame.
Type:
  • Boolean
Overrides:
Source:

maxActiveAltitude :Number

The eye altitude below which this layer is displayed, in meters.
Type:
  • Number
Inherited From:
Default Value:
  • Number.MAX_VALUE (always displayed)
Source:

minActiveAltitude :Number

The eye altitude above which this layer is displayed, in meters.
Type:
  • Number
Inherited From:
Default Value:
  • -Number.MAX_VALUE (always displayed)
Source:

opacity :Number

This layer's opacity, which is combined with the opacity of shapes within layers. Opacity is in the range [0, 1], with 1 indicating fully opaque.
Type:
  • Number
Inherited From:
Default Value:
  • 1
Source:

pickEnabled :Boolean

Indicates whether this layer is pickable.
Type:
  • Boolean
Overrides:
Default Value:
  • true
Source:

time :Date

A value indicating the month to display. The nearest month to the specified time is displayed.
Type:
  • Date
Overrides:
Default Value:
  • January 2004 (new Date("2004-01"));
Source:

Methods

(protected) doRender(dc)

Subclass method called to display this layer. Subclasses should implement this method rather than the render method, which determines enable, pick and active altitude status and does not call this doRender method if the layer should not be displayed.
Parameters:
Name Type Description
dc DrawContext The current draw context.
Overrides:
Source:

(protected) isLayerInView(dc) → {boolean}

Indicates whether this layer is within the current view. Subclasses may override this method and when called determine whether the layer contents are visible in the current view frustum. The default implementation always returns true.
Parameters:
Name Type Description
dc DrawContext The current draw context.
Inherited From:
Source:
Returns:
true If this layer is within the current view, otherwise false.
Type
boolean

isPrePopulated(wwd) → {Boolean}

Indicates whether this layer's level 0 tile images for all sub-layers have been retrieved and associated with the tiles. Use prePopulate to initiate retrieval of level 0 images.
Parameters:
Name Type Description
wwd WorldWindow The WorldWindow associated with this layer.
Source:
Throws:
If the specified WorldWindow is null or undefined.
Type
ArgumentError
Returns:
true if all level 0 images have been retrieved, otherwise false.
Type
Boolean

prePopulate(wwd)

Initiates retrieval of this layer's level 0 images for all sub-layers. Use isPrePopulated to determine when the images have been retrieved and associated with the level 0 tiles. Pre-populating is not required. It is used to eliminate the visual effect of loading tiles incrementally, but only for level 0 tiles. An application might pre-populate a layer in order to delay displaying it within a time series until all the level 0 images have been retrieved and added to memory.
Parameters:
Name Type Description
wwd WorldWindow The WorldWindow for which to pre-populate this layer.
Source:
Throws:
If the specified WorldWindow is null or undefined.
Type
ArgumentError

refresh()

Refreshes the data associated with this layer. The behavior of this function varies with the layer type. For image layers, it causes the images to be re-retrieved from their origin.
Inherited From:
Source:

render(dc)

Displays this layer. Subclasses should generally not override this method but should instead override the doRender method. This method calls that method after verifying that the layer is enabled, the eye point is within this layer's active altitudes and the layer is in view.
Parameters:
Name Type Description
dc DrawContext The current draw context.
Inherited From:
Source: