Fork me on GitHub
Show:

DewPoints

Summary

Constructor

aeris.maps.layers.DewPoints

Syntax

aeris.maps.layers.DewPoints

()

Summary

Methods

createFutureTileTimesUrl_

Syntax

createFutureTileTimesUrl_

() private

Summary

createStrategy_

Syntax

createStrategy_

(
  • Strategy
)
AbstractStrategy protected

Summary

Create a {aeris.maps.AbstractStrategy} instance.

Override to adjust how strategy objects are instantiated.

Parameters:

  • Strategy Function

    AbstractStrategy object ctor.

Returns:

createTileTimesUrl_

Syntax

createTileTimesUrl_

() String private

Summary

Returns:

createTileTimesUrlForEndpoint_

Syntax

createTileTimesUrlForEndpoint_

(
  • endpoint
)
private

Summary

Parameters:

  • endpoint String

    Tile type endpoint.

ensureApiKeys_

Syntax

ensureApiKeys_

() private

Summary

fadeTo

Syntax

fadeTo

(
  • targetOpacity
  • duration
)

Summary

Experimental layer fade animation.

Parameters:

getAerisTimeString

Syntax

getAerisTimeString

() String

Summary

Get's the layer's time, formatted for the Aeris API.

Returns:

String:

Format: [year][month][date][hours][minutes][seconds].

getOpacity

Syntax

getOpacity

() Number

Summary

Returns:

getRandomSubdomain

Syntax

getRandomSubdomain

() String

Summary

Returns:

String:

A random subdomain for the tile server.

getTileTypeEndpoint_

Syntax

getTileTypeEndpoint_

() private

Summary

getTimestamp

Syntax

getTimestamp

() Number

Summary

Returns:

Number:

UNIX Timestamp.

getUrl

Syntax

getUrl

()

Summary

getView

Syntax

getView

() *

Summary

Returns the object view, as rendered by the object's strategy.

Returns:

*:

getZIndex

Syntax

getZIndex

() Number

Summary

Returns:

hasMap

Syntax

hasMap

() Boolean

Summary

Returns:

Boolean:

Returns true if the layer has a map set.

hide

Syntax

hide

()

Summary

Hide the layer.

initialize

Syntax

initialize

() protected

Summary

isLoaded

Syntax

isLoaded

() Boolean

Summary

Returns:

Boolean:

True, if tile images have finished loading.

loadTileTimes

Syntax

loadTileTimes

() Promise

Summary

Retrieve a list of timestamps for which tile images are available on the AerisAPI server.

Returns:

Promise:

Resolves with arrary of timestamps.

loadTileTimesForEndpoint_

Syntax

loadTileTimesForEndpoint_

(
  • endpoint
)
Promise private

Summary

Parameters:

Returns:

parseTileTimes_

Syntax

parseTileTimes_

(
  • res
)
Array.<number> private

Summary

Parameters:

  • res Object

    Aeris Tile Times API response object.

Returns:

Array.<number>:

Array of JS formatted timestamps.

preload

Syntax

preload

(
  • map
)

Summary

Preloads the tile layer images.

Parameters:

  • map Map

    The layer will be temporarily set to this map, in order to trigger it's tile images to start loading.

rejectAfterTimeout_

Syntax

rejectAfterTimeout_

(
  • promise
  • timeout
  • message
)
private

Summary

Parameters:

removeStrategy

Syntax

removeStrategy

()

Summary

Remove and clean up the StrategyObject's strategy.

resetStrategy

Syntax

resetStrategy

()

Summary

Reset the rendering strategy used by the object. Useful for re-enabled a strategy which has previously been removed with StrategyObject#removeStrategy

setOpacity

Syntax

setOpacity

(
  • opacity
)

Summary

Sets the opacity of the tile layer.

Parameters:

  • opacity Number

    Between 0 and 1.

setStrategy

Syntax

setStrategy

(
  • Strategy
)

Summary

Set the strategy to use for rendering the StrategyObject.

Parameters:

  • Strategy Function

    Constructor for an {aeris.maps.AbstractStrategy} object.

setZIndex

Syntax

setZIndex

()

Summary

Sets the zIndex of a tile layer.

show

Syntax

show

()

Summary

Show the layer.

validate

Syntax

validate

()

Summary

zoomFactor

Syntax

zoomFactor

(
  • zoom
)
Number

Summary

Implemented map specific zoom factor calculation.

Parameters:

  • zoom Number

    the map's current zoom level.

Returns:

Properties

autoUpdateIntervalTimer_

Syntax

autoUpdateIntervalTimer_

Number private

Summary

A reference to the timer created with window.setInterval, used for autoUpdating.

strategy_

Syntax

strategy_

aeris.maps.Strategy Strategy constructor.

Summary

Default {aeris.Strategy} implementation

StrategyType_

Syntax

StrategyType_

function():aeris.maps.AbstractStrategy private

Summary

Attributes

apiId

String

Aeris API client_id

apiSecret

String

Aeris API client_secret

autoUpdateInterval

number Milliseconds.

Interval at which to update the tile.

futureTileType

The type of Aeris Interactive tile to use when the tile's time is set to a future date.

map

Map protected

An AerisMap that the object is bound to. This is set with setMap.

maxZoom

number

The maximum zoom level provided by the tile renderer.

Default: 22

minZoom

number

The minimum zoom level provided by the tile renderer.

Default: 0

name

string

The name of the tile layer.

The value of the name can be anything, though some map views will display this name in layer-select controls.

server

string

The server used for requesting tiles. The server will be interpolated by replacing special variables with calculated values. Special variables should be wrapped with '{' and '}'

  • {d} - a randomly selected subdomain

subdomains

Array.<string>

An array of subdomains to use for load balancing tile requests.

tileType

string

Interactive tile type.

time

Date

Tile's timestamp. Defaults to 0. Note that request to the AI Tiles API at time '0' will return the latest available tile.

Events

autoUpdate

Syntax

autoUpdate

Summary

The tile has automatically updated to the most current time.

load

Syntax

load

Summary

Fires when tile images are loaded.

load:reset

Syntax

load:reset

Summary

Firest when tile images must be re-loaded (eg. if the map bounds change)

strategy:set

Syntax

strategy:set

Summary

When a strategy is set on the object.

Event Payload: