Add line string collections to ol.source.VectorSource2
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user