goog.provide('ol.source.StaticVector'); goog.require('ol.source.FormatVector'); goog.require('ol.source.State'); /** * @constructor * @extends {ol.source.FormatVector} * @fires {@link ol.source.VectorEvent} ol.source.VectorEvent * @param {olx.source.StaticVectorOptions} options Options. * @todo api */ ol.source.StaticVector = function(options) { goog.base(this, { attributions: options.attributions, extent: options.extent, format: options.format, logo: options.logo, projection: options.projection }); if (goog.isDef(options.arrayBuffer)) { this.addFeaturesInternal(this.readFeatures(options.arrayBuffer)); } if (goog.isDef(options.doc)) { this.addFeaturesInternal(this.readFeatures(options.doc)); } if (goog.isDef(options.node)) { this.addFeaturesInternal(this.readFeatures(options.node)); } if (goog.isDef(options.object)) { this.addFeaturesInternal(this.readFeatures(options.object)); } if (goog.isDef(options.text)) { this.addFeaturesInternal(this.readFeatures(options.text)); } if (goog.isDef(options.url) || goog.isDef(options.urls)) { this.setState(ol.source.State.LOADING); if (goog.isDef(options.url)) { this.loadFeaturesFromURL(options.url, /** * @param {Array.