# 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

- OpenLayers.Layer.Vector

Summary

OpenLayers.Layer.PointTrack | Vector layer to display ordered point features as a line, creating one LineString feature for each pair of two points.
Constructor |
OpenLayers.PointTrack | Constructor for a new OpenLayers.PointTrack instance.
Functions |
addNodes | Adds point features that will be used to create lines from, using point pairs.
Constants |
OpenLayers.Layer.PointTrack.SOURCE_NODE | {Number} value for OpenLayers.Layer.PointTrack.dataFrom and <OpenLayers.Layer.PointTrack.styleFrom>
OpenLayers.Layer.PointTrack.TARGET_NODE | {Number} value for OpenLayers.Layer.PointTrack.dataFrom and <OpenLayers.Layer.PointTrack.styleFrom>
OpenLayers.Layer.PointTrack.dataFrom |

### 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

{Number} value for OpenLayers.Layer.PointTrack.dataFrom and <OpenLayers.Layer.PointTrack.styleFrom>

### OpenLayers.Layer.PointTrack.TARGET_NODE

{Number} value for OpenLayers.Layer.PointTrack.dataFrom and <OpenLayers.Layer.PointTrack.styleFrom>

### 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

> addNodes: function( | pointFeatures,
> | options | )

Adds point features that will be used to create lines from, using point pairs.
Instances of OpenLayers.Layer.Vector are used to render vector data from a variety of sources.
Features are combinations of geography and attributes.
Close