Fork me on GitHub
Show:

LightningMarker

Summary

Constructor

aeris.maps.markers.LightningMarker

Syntax

aeris.maps.markers.LightningMarker

()

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:

getIconConfig_

Syntax

getIconConfig_

() private

Summary

getPosition

Syntax

getPosition

() LatLon

Summary

Returns:

getSelectedUrl

Syntax

getSelectedUrl

() String

Summary

Returns:

getType

Syntax

getType

() String

Summary

The type category of this marker. Generally, corresponds to a data filter.

Returns:

getUrl

Syntax

getUrl

() String

Summary

Return the url of the marker icon.

Returns:

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.

lookupOffsetX_

Syntax

lookupOffsetX_

() private

Summary

lookupOffsetY_

Syntax

lookupOffsetY_

() private

Summary

lookupPosition_

Syntax

lookupPosition_

() LatLon protected

Summary

Lookup marker position from data model.

Returns:

lookupSelectedUrl_

Syntax

lookupSelectedUrl_

() private

Summary

lookupTitle_

Syntax

lookupTitle_

() protected

Summary

lookupType_

Syntax

lookupType_

() private

Summary

lookupUrl_

Syntax

lookupUrl_

() String protected

Summary

Lookup the icon url.

Returns:

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

setPosition

Syntax

setPosition

(
  • latLon
)

Summary

Parameters:

setSelectedUrl

Syntax

setSelectedUrl

(
  • selectedUrl
)

Summary

Parameters:

setStrategy

Syntax

setStrategy

(
  • Strategy
)

Summary

Set the strategy to use for rendering the StrategyObject.

Parameters:

  • Strategy Function

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

setUrl

Syntax

setUrl

(
  • url
)

Summary

Parameters:

validate

Syntax

validate

() protected

Summary

Properties

iconLookup_

Syntax

iconLookup_

| private

Summary

An object to lookup a marker's icon url by it's type.

eg: { blizzard: 'storm/icon_blizzard_sm', snow: 'stormicon_snow_sm' }

iconPath_

Syntax

iconPath_

String private

Summary

The path to a icon url, where {name} is the name of the icon defined in this.iconLookup_

selectedIconPath_

Syntax

selectedIconPath_

String private

Summary

The path to the icon url, to use only when the marker is selected.

Defaults to the iconPath.

strategy_

Syntax

strategy_

aeris.maps.Strategy Strategy constructor.

Summary

Default {aeris.Strategy} implementation

StrategyType_

Syntax

StrategyType_

function():aeris.maps.AbstractStrategy private

Summary

typeAttribute_

Syntax

typeAttribute_

| String private

Summary

The data attribute used to categorize the marker.

Defined as a '.' delimited string. eg. 'weather.type' would map to this.get('data').get('weather').type;

Attributes

clickable

Boolean

Whether to allow click events on the marker.

draggable

Boolean

Whether to allow drag events on the marker.

map

Map protected

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

offsetX

number

Pixels between the marker's lat/lon position and the left side of the icon image.

offsetY

number

Pixels between the marker's lat/lon position and the top of the icon image.

title

string

Marker title.

Default: ''

type

string

The type category this marker belongs to. Useful organizing markers which match some filter.

Events

click

Syntax

click

Summary

Event Payload:

dragend

Syntax

dragend

Summary

Event Payload:

strategy:set

Syntax

strategy:set

Summary

When a strategy is set on the object.

Event Payload: