Fork me on GitHub
Show:

OSM

Summary

Representation of OpenStreetMaps layer.

Constructor

aeris.maps.layers.OSM

Syntax

aeris.maps.layers.OSM

()

Summary

Methods

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:

fadeTo

Syntax

fadeTo

(
  • targetOpacity
  • duration
)

Summary

Experimental layer fade animation.

Parameters:

getOpacity

Syntax

getOpacity

() Number

Summary

Returns:

getRandomSubdomain

Syntax

getRandomSubdomain

() String

Summary

Returns:

String:

A random subdomain for the tile server.

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.

isLoaded

Syntax

isLoaded

() Boolean

Summary

Returns:

Boolean:

True, if tile images have finished loading.

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.

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

strategy_

Syntax

strategy_

aeris.maps.Strategy Strategy constructor.

Summary

Default {aeris.Strategy} implementation

StrategyType_

Syntax

StrategyType_

function():aeris.maps.AbstractStrategy private

Summary

Attributes

autoUpdateInterval

number

Milliseconds between an autoupdate of the data.

Default: 6000 (1 second)

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.

Events

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: