ALKMaps.Strategy

Abstract vector layer strategy class.  Not to be instantiated directly.  Use one of the strategy subclasses instead.

Summary
ALKMaps.StrategyAbstract vector layer strategy class.
Properties
layer{ALKMaps.Layer.Vector} The layer this strategy belongs to.
options{Object} Any options sent to the constructor.
active{Boolean} The control is active.
autoActivate{Boolean} The creator of the strategy can set autoActivate to false to fully control when the protocol is activated and deactivated.
autoDestroy{Boolean} The creator of the strategy can set autoDestroy to false to fully control when the strategy is destroyed.
Constructor
ALKMaps.StrategyAbstract class for vector strategies.
Functions
destroyClean up the strategy.
setLayerCalled to set the layer property.
activateActivate the strategy.
deactivateDeactivate the strategy.

Properties

layer

{ALKMaps.Layer.Vector} The layer this strategy belongs to.

options

{Object} Any options sent to the constructor.

active

{Boolean} The control is active.

autoActivate

{Boolean} The creator of the strategy can set autoActivate to false to fully control when the protocol is activated and deactivated.  Defaults to true.

autoDestroy

{Boolean} The creator of the strategy can set autoDestroy to false to fully control when the strategy is destroyed.  Defaults to true.

Constructor

ALKMaps.Strategy

Abstract class for vector strategies.  Create instances of a subclass.

Parameters

options{Object} Optional object whose properties will be set on the instance.

Functions

destroy

destroy: function()

Clean up the strategy.

setLayer

setLayer: function(layer)

Called to set the layer property.

Parameters

layer{ALKMaps.Layer.Vector}

activate

activate: function()

Activate the strategy.  Register any listeners, do appropriate setup.

Returns

{Boolean} True if the strategy was successfully activated or false if the strategy was already active.

deactivate

deactivate: function()

Deactivate the strategy.  Unregister any listeners, do appropriate tear-down.

Returns

{Boolean} True if the strategy was successfully deactivated or false if the strategy was already inactive.

Instances of ALKMaps.Layer.Vector are used to render vector data from a variety of sources.
destroy: function()
Clean up the strategy.
setLayer: function(layer)
Called to set the layer property.
{ALKMaps.Layer.Vector} The layer this strategy belongs to.
activate: function()
Activate the strategy.
deactivate: function()
Deactivate the strategy.
Close