Add line string collections to ol.source.VectorSource2

This commit is contained in:
Tom Payne
2013-05-01 16:22:14 +02:00
parent 1690cb9cae
commit 8f86288614
2 changed files with 18 additions and 0 deletions

View File

@@ -465,6 +465,8 @@
* @typedef {Object} ol.source.VectorSource2Options
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
* @property {ol.Extent|undefined} extent Extent.
* @property {Array.<ol.geom2.LineStringCollection>|undefined}
* lineStringCollections Line string collections.
* @property {Array.<ol.geom2.PointCollection>|undefined} pointCollections
* Point collections.
* @property {ol.ProjectionLike} projection Projection.

View File

@@ -1,5 +1,6 @@
goog.provide('ol.source.VectorSource2');
goog.require('ol.geom2.LineStringCollection');
goog.require('ol.geom2.PointCollection');
goog.require('ol.source.Source');
@@ -25,10 +26,25 @@ ol.source.VectorSource2 = function(options) {
this.pointCollections_ = goog.isDef(options.pointCollections) ?
options.pointCollections : [];
/**
* @private
* @type {Array.<ol.geom2.LineStringCollection>}
*/
this.lineStringCollections_ = goog.isDef(options.lineStringCollections) ?
options.lineStringCollections : [];
};
goog.inherits(ol.source.VectorSource2, ol.source.Source);
/**
* @return {Array.<ol.geom2.LineStringCollection>} Line string collections.
*/
ol.source.VectorSource2.prototype.getLineStringCollections = function() {
return this.lineStringCollections_;
};
/**
* @return {Array.<ol.geom2.PointCollection>} Point collections.
*/