Fork me on GitHub
Show:

MapExtensionObject

Summary

An abstraction for an object to be handled by a map extension.

A MapExtensionObject holds meta-data about view being rendered on a map; for example, the color of a polyline, the opacity of a layer, the url endpoint for fetching tile images.

A MapExtensionObject creates a strategy, whose job is to render the metadata held by a MapExtObj onto a map. The MapExtObj tells the strategy about itself, then let's the strategy do it's thing.

Constructor

aeris.maps.extensions.MapExtensionObject

Syntax

aeris.maps.extensions.MapExtensionObject

(
  • opt_attrs
  • opt_options
)

Summary

Parameters:

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:

destroy

Syntax

destroy

()

Summary

getMap

Syntax

getMap

()

Summary

getView

Syntax

getView

() *

Summary

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

Returns:

*:

hasMap

Syntax

hasMap

() Boolean

Summary

Returns:

Boolean:

Returns true if the layer has a map set.

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

setMap

Syntax

setMap

()

Summary

setStrategy

Syntax

setStrategy

(
  • Strategy
)

Summary

Set the strategy to use for rendering the StrategyObject.

Parameters:

  • Strategy Function

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

validate

Syntax

validate

()

Summary

Properties

strategy_

Syntax

strategy_

aeris.maps.Strategy Strategy constructor.

Summary

Default {aeris.Strategy} implementation

StrategyType_

Syntax

StrategyType_

function():aeris.maps.AbstractStrategy private

Summary

Attributes

map

Map protected

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

name

string

A name/type for the object.

Events

strategy:set

Syntax

strategy:set

Summary

When a strategy is set on the object.

Event Payload: