OpenLayers. Layer. PointTrack

Vector layer to display ordered point features as a line, creating one LineString feature for each pair of two points.

Inherits from

Summary

Properties

dataFrom

{OpenLayers.Layer.PointTrack.TARGET_NODE} or {OpenLayers.Layer.PointTrack.SOURCE_NODE} optional.  If the lines should get the data/attributes from one of the two points it is composed of, which one should it be?

styleFrom

{OpenLayers.Layer.PointTrack.TARGET_NODE} or {OpenLayers.Layer.PointTrack.SOURCE_NODE} optional.  If the lines should get the style from one of the two points it is composed of, which one should it be?

Constructor

OpenLayers. PointTrack

Constructor for a new OpenLayers.PointTrack instance.

Parameters

name {String} name of the layer
options {Object} Optional object with properties to tag onto the instance.

Functions

addNodes

addNodes: function( pointFeatures,
options )

Adds point features that will be used to create lines from, using point pairs.  The first point of a pair will be the source node, the second will be the target node.

Parameters

pointFeatures {Array(OpenLayers.Feature)}
options {Object}

Supported options

silent {Boolean} true to suppress (before)feature(s)added events

Constants

OpenLayers. Layer. PointTrack. SOURCE_NODE

OpenLayers. Layer. PointTrack. TARGET_NODE

OpenLayers. Layer. PointTrack. dataFrom

{Object} with the following keys deprecated
  • SOURCE_NODE: take data/attributes from the source node of the line
  • TARGET_NODE: take data/attributes from the target node of the line
{Number} value for OpenLayers.Layer.PointTrack.dataFrom and OpenLayers.Layer.PointTrack.styleFrom
{Number} value for OpenLayers.Layer.PointTrack.dataFrom and OpenLayers.Layer.PointTrack.styleFrom
addNodes: function( pointFeatures,
options )
Adds point features that will be used to create lines from, using point pairs.
{OpenLayers.Layer.PointTrack.TARGET_NODE} or {OpenLayers.Layer.PointTrack.SOURCE_NODE} optional.
Instances of OpenLayers.Layer.Vector are used to render vector data from a variety of sources.
Features are combinations of geography and attributes.
Close