Fork me on GitHub
Show:

MarkerCollection

Summary

A collection of Marker objects.

By default, marker collections are rendered using a clustering strategy (eg MarkerClustererPlus for google maps).

A MarkerCollection is a type of ViewCollection, which means that it can bind its attributes to a data collection (Collection or Backbone.Collection). Any changes, additions, or deletions to the bound data collection will be reflected in the marker collection.

See Marker documentation for more information on transforming raw data into marker attributes. Note that attributeTransforms can be set directly on the MarkerCollection object using the modelOptions option:

var markers = new aeris.maps.markercollections.MarkerCollection(null, { modelOptions: { attributeTransforms: { // ... } } });

Constructor

aeris.maps.markercollections.MarkerCollection

Syntax

aeris.maps.markercollections.MarkerCollection

(
  • opt_markers
  • opt_options
)

Summary

Parameters:

Methods

_onModelEvent

Syntax

_onModelEvent

()

Summary

From Backbone.Collection#_onModelEvent

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:

getClusterOptions

Syntax

getClusterOptions

() Object

Summary

Returns:

getClusterStyle

Syntax

getClusterStyle

(
  • opt_group
)
Object

Summary

Returns a copy of the cluster styles for the specified cluster group.

Parameters:

  • opt_group String=

    Defaults to 'defaultStyles.'.

Returns:

Object:

Cluster styles object.

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

Set the map on all child MapObjects.

Any newly created map objects will be instantiated with the map set here.

setStrategy

Syntax

setStrategy

(
  • Strategy
)

Summary

Set the strategy to use for rendering the StrategyObject.

Parameters:

  • Strategy Function

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

startClustering

Syntax

startClustering

()

Summary

Starts up the strategy defined by this.clusterStrategy_.

stopClustering

Syntax

stopClustering

()

Summary

Destroys the clustering strategy started up by #startClustering.

Properties

clusterOptions_

Syntax

clusterOptions_

Object private

Summary

clusterStrategy_

Syntax

clusterStrategy_

function():aeris.maps.AbstractStrategy private

Summary

isClustering_

Syntax

isClustering_

Boolean private

Summary

Whether a clustering strategy is currently active.

map_

Syntax

map_

?aeris.maps.Map private

Summary

strategy_

Syntax

strategy_

?aeris.maps.AbstractStrategy protected

Summary

The strategy used to interact with the map view.

StrategyType_

Syntax

StrategyType_

function():aeris.maps.AbstractStrategy private

Summary

Events

cluster:click

Syntax

cluster:click

Summary

Event Payload:

cluster:click

Syntax

cluster:click

Summary

Event Payload:

cluster:mouseout

Syntax

cluster:mouseout

Summary

When the mouse exits a cluster.

Event Payload:

cluster:mouseout

Syntax

cluster:mouseout

Summary

When the mouse exits a cluster.

Event Payload:

cluster:mouseover

Syntax

cluster:mouseover

Summary

When the mouse enters a cluster.

Event Payload:

cluster:mouseover

Syntax

cluster:mouseover

Summary

When the mouse enters a cluster.

Event Payload:

strategy:set

Syntax

strategy:set

Summary

When a strategy is set on the object.

Event Payload: