Add ol.source.VectorSource2
This commit is contained in:
@@ -461,6 +461,15 @@
|
|||||||
* of `url` when the WMS supports multiple urls for GetMap requests.
|
* of `url` when the WMS supports multiple urls for GetMap requests.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {Object} ol.source.VectorSource2Options
|
||||||
|
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
||||||
|
* @property {ol.Extent|undefined} extent Extent.
|
||||||
|
* @property {Array.<ol.geom2.PointCollection>|undefined} pointCollections
|
||||||
|
* Point collections.
|
||||||
|
* @property {ol.ProjectionLike} projection Projection.
|
||||||
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {Object} ol.source.WMTSOptions
|
* @typedef {Object} ol.source.WMTSOptions
|
||||||
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
* @property {Array.<ol.Attribution>|undefined} attributions Attributions.
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
@exportSymbol ol.source.VectorSource2
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
goog.provide('ol.source.VectorSource2');
|
||||||
|
|
||||||
|
goog.require('ol.geom2.PointCollection');
|
||||||
|
goog.require('ol.source.Source');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @constructor
|
||||||
|
* @extends {ol.source.Source}
|
||||||
|
* @param {ol.source.VectorSource2Options} options Options.
|
||||||
|
*/
|
||||||
|
ol.source.VectorSource2 = function(options) {
|
||||||
|
|
||||||
|
goog.base(this, {
|
||||||
|
attributions: options.attributions,
|
||||||
|
extent: options.extent,
|
||||||
|
projection: options.projection
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @private
|
||||||
|
* @type {Array.<ol.geom2.PointCollection>}
|
||||||
|
*/
|
||||||
|
this.pointCollections_ = goog.isDef(options.pointCollections) ?
|
||||||
|
options.pointCollections : [];
|
||||||
|
|
||||||
|
};
|
||||||
|
goog.inherits(ol.source.VectorSource2, ol.source.Source);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {Array.<ol.geom2.PointCollection>} Point collections.
|
||||||
|
*/
|
||||||
|
ol.source.VectorSource2.prototype.getPointCollections = function() {
|
||||||
|
return this.pointCollections_;
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user