diff --git a/build.py b/build.py index 86f303d7d6..0e391bd7a9 100755 --- a/build.py +++ b/build.py @@ -316,8 +316,7 @@ def examples_star_json(name, match): "externs/jquery-1.9.js", "externs/proj4js.js", "externs/tilejson.js", - "externs/topojson.js", - "externs/vbarray.js" + "externs/topojson.js" ], "define": [ "goog.array.ASSUME_NATIVE_FUNCTIONS=true", diff --git a/config/examples-all.json b/config/examples-all.json index 35e32667df..ab1268943a 100644 --- a/config/examples-all.json +++ b/config/examples-all.json @@ -21,8 +21,7 @@ "externs/jquery-1.9.js", "externs/proj4js.js", "externs/tilejson.js", - "externs/topojson.js", - "externs/vbarray.js" + "externs/topojson.js" ], "define": [ "goog.array.ASSUME_NATIVE_FUNCTIONS=true", diff --git a/config/ol.json b/config/ol.json index 7367530e45..1e2658e040 100644 --- a/config/ol.json +++ b/config/ol.json @@ -11,8 +11,7 @@ "externs/olx.js", "externs/proj4js.js", "externs/tilejson.js", - "externs/topojson.js", - "externs/vbarray.js" + "externs/topojson.js" ], "define": [ "goog.array.ASSUME_NATIVE_FUNCTIONS=true", diff --git a/doc/tutorials/closure.md b/doc/tutorials/closure.md index f1fef84697..3108b592e8 100644 --- a/doc/tutorials/closure.md +++ b/doc/tutorials/closure.md @@ -164,8 +164,7 @@ The minimum config file looks like this: "node_modules/openlayers/externs/geojson.js", "node_modules/openlayers/externs/proj4js.js", "node_modules/openlayers/externs/tilejson.js", - "node_modules/openlayers/externs/topojson.js", - "node_modules/openlayers/externs/vbarray.js" + "node_modules/openlayers/externs/topojson.js" ], "define": [ "goog.array.ASSUME_NATIVE_FUNCTIONS=true", @@ -221,8 +220,7 @@ Here is a version of `config.json` with more compilation checks enabled: "node_modules/openlayers/externs/geojson.js", "node_modules/openlayers/externs/proj4js.js", "node_modules/openlayers/externs/tilejson.js", - "node_modules/openlayers/externs/topojson.js", - "node_modules/openlayers/externs/vbarray.js" + "node_modules/openlayers/externs/topojson.js" ], "define": [ "goog.array.ASSUME_NATIVE_FUNCTIONS=true", diff --git a/doc/tutorials/custom-builds.md b/doc/tutorials/custom-builds.md index 3a2f4da331..4c1f049b21 100644 --- a/doc/tutorials/custom-builds.md +++ b/doc/tutorials/custom-builds.md @@ -57,8 +57,7 @@ Creating a custom build requires writing a build configuration file. The format "externs/olx.js", "externs/proj4js.js", "externs/tilejson.js", - "externs/topojson.js", - "externs/vbarray.js" + "externs/topojson.js" ], "define": [ "goog.array.ASSUME_NATIVE_FUNCTIONS=true", diff --git a/externs/vbarray.js b/externs/vbarray.js deleted file mode 100644 index 187817fd54..0000000000 --- a/externs/vbarray.js +++ /dev/null @@ -1,46 +0,0 @@ -/** - * @externs - * @see http://msdn.microsoft.com/en-us/library/y39d47w8(v=vs.94).aspx - */ - - - -/** - * FIXME check argument type - * @constructor - * @param {VBArray|string} safeArray - */ -var VBArray = function(safeArray) {}; - - -/** - * @return {number} - */ -VBArray.prototype.dimensions = function() {}; - - -/** - * @param {...number} var_args - * @return {*} - */ -VBArray.prototype.getItem = function(var_args) {}; - - -/** - * @param {number=} opt_dimension - * @return {*} - */ -VBArray.prototype.lbound = function(opt_dimension) {}; - - -/** - * @return {Array.} - */ -VBArray.prototype.toArray = function() {}; - - -/** - * @param {number=} opt_dimension - * @return {*} - */ -VBArray.prototype.ubound = function(opt_dimension) {}; diff --git a/src/ol/binary.js b/src/ol/binary.js deleted file mode 100644 index 27e822d46d..0000000000 --- a/src/ol/binary.js +++ /dev/null @@ -1,177 +0,0 @@ -// FIXME Test on Internet Explorer with VBArray - -goog.provide('ol.binary.Buffer'); -goog.provide('ol.binary.IReader'); - -goog.require('goog.asserts'); -goog.require('goog.userAgent'); -goog.require('ol.has'); - - - -/** - * @constructor - * @param {ArrayBuffer|string} data Data. - */ -ol.binary.Buffer = function(data) { - - /** - * @private - * @type {ArrayBuffer|string} - */ - this.data_ = data; - -}; - - -/** - * @return {ol.binary.IReader} Reader. - */ -ol.binary.Buffer.prototype.getReader = function() { - var data = this.data_; - if (ol.has.ARRAY_BUFFER) { - var arrayBuffer; - if (data instanceof ArrayBuffer) { - arrayBuffer = data; - } else if (goog.isString(data)) { - // FIXME check what happens with Unicode - arrayBuffer = new ArrayBuffer(data.length); - var uint8View = new Uint8Array(arrayBuffer); - var i, ii; - for (i = 0, ii = data.length; i < ii; ++i) { - uint8View[i] = data.charCodeAt(i); - } - } else { - goog.asserts.fail('Unknown data type, should be string or ArrayBuffer'); - return null; - } - return new ol.binary.ArrayBufferReader(arrayBuffer); - } else { - goog.asserts.assert(goog.isString(data), 'Data should be a string'); - goog.asserts.assert( - goog.userAgent.IE && !goog.userAgent.isVersionOrHigher('10.0'), - 'In IE10 and above ArrayBuffer should be used instead'); - return new ol.binary.ArrayReader(new VBArray(data).toArray()); - } -}; - - - -/** - * @interface - */ -ol.binary.IReader = function() {}; - - -/** - * @return {boolean} At EOF. - */ -ol.binary.IReader.prototype.atEOF = function() {}; - - -/** - * @return {number} Byte. - */ -ol.binary.IReader.prototype.readByte = function() {}; - - - -/** - * @constructor - * @param {ArrayBuffer} arrayBuffer Array buffer. - * @implements {ol.binary.IReader} - */ -ol.binary.ArrayBufferReader = function(arrayBuffer) { - - /** - * @private - * @type {Uint8Array} - */ - this.uint8View_ = new Uint8Array(arrayBuffer); - - /** - * @private - * @type {number} - */ - this.length_ = this.uint8View_.length; - - /** - * @private - * @type {number} - */ - this.offset_ = 0; - -}; - - -/** - * @inheritDoc - */ -ol.binary.ArrayBufferReader.prototype.atEOF = function() { - return this.offset_ == this.length_; -}; - - -/** - * @inheritDoc - */ -ol.binary.ArrayBufferReader.prototype.readByte = function() { - if (this.offset_ < this.length_) { - return this.uint8View_[this.offset_++]; - } else { - goog.asserts.fail( - 'readByte fails because offset is larger than or equal to length'); - return 0; - } -}; - - - -/** - * @constructor - * @implements {ol.binary.IReader} - * @param {Array.} array Array. - */ -ol.binary.ArrayReader = function(array) { - - /** - * @private - * @type {Array.} - */ - this.array_ = array; - - /** - * @private - * @type {number} - */ - this.length_ = array.length; - - /** - * @private - * @type {number} - */ - this.offset_ = 0; - -}; - - -/** - * @inheritDoc - */ -ol.binary.ArrayReader.prototype.atEOF = function() { - return this.offset_ == this.length_; -}; - - -/** - * @inheritDoc - */ -ol.binary.ArrayReader.prototype.readByte = function() { - if (this.offset_ < this.length_) { - return this.array_[this.offset_++]; - } else { - goog.asserts.fail( - 'readByte fails because offset is larger than or equal to length'); - return 0; - } -}; diff --git a/src/ol/featureloader.js b/src/ol/featureloader.js index e3c7ab279b..a7692c5d86 100644 --- a/src/ol/featureloader.js +++ b/src/ol/featureloader.js @@ -37,15 +37,7 @@ ol.featureloader.loadFeaturesXhr = function(url, format, success) { function(extent, resolution, projection) { var xhrIo = new goog.net.XhrIo(); var type = format.getType(); - var responseType; - // FIXME maybe use ResponseType.DOCUMENT? - if (type == ol.format.FormatType.BINARY && - ol.has.ARRAY_BUFFER) { - responseType = goog.net.XhrIo.ResponseType.ARRAY_BUFFER; - } else { - responseType = goog.net.XhrIo.ResponseType.TEXT; - } - xhrIo.setResponseType(responseType); + xhrIo.setResponseType(goog.net.XhrIo.ResponseType.TEXT); goog.events.listen(xhrIo, goog.net.EventType.COMPLETE, /** * @param {Event} event Event. @@ -58,14 +50,9 @@ ol.featureloader.loadFeaturesXhr = function(url, format, success) { 'event.target/xhrIo is an instance of goog.net.XhrIo'); if (xhrIo.isSuccess()) { var type = format.getType(); - /** @type {ArrayBuffer|Document|Node|Object|string|undefined} */ + /** @type {Document|Node|Object|string|undefined} */ var source; - if (type == ol.format.FormatType.BINARY && - ol.has.ARRAY_BUFFER) { - source = xhrIo.getResponse(); - goog.asserts.assertInstanceof(source, ArrayBuffer, - 'source is an instance of ArrayBuffer'); - } else if (type == ol.format.FormatType.JSON) { + if (type == ol.format.FormatType.JSON) { source = xhrIo.getResponseText(); } else if (type == ol.format.FormatType.TEXT) { source = xhrIo.getResponseText(); diff --git a/src/ol/format/binaryfeatureformat.js b/src/ol/format/binaryfeatureformat.js deleted file mode 100644 index ff84c4dd2b..0000000000 --- a/src/ol/format/binaryfeatureformat.js +++ /dev/null @@ -1,111 +0,0 @@ -goog.provide('ol.format.BinaryFeature'); - -goog.require('goog.asserts'); -goog.require('ol.binary.Buffer'); -goog.require('ol.format.Feature'); -goog.require('ol.format.FormatType'); -goog.require('ol.has'); -goog.require('ol.proj'); - - - -/** - * @constructor - * @extends {ol.format.Feature} - */ -ol.format.BinaryFeature = function() { - goog.base(this); -}; -goog.inherits(ol.format.BinaryFeature, ol.format.Feature); - - -/** - * @param {ArrayBuffer|Document|Node|Object|string} source Source. - * @private - * @return {ol.binary.Buffer} Buffer. - */ -ol.format.BinaryFeature.getBuffer_ = function(source) { - if (ol.has.ARRAY_BUFFER && source instanceof ArrayBuffer) { - return new ol.binary.Buffer(source); - } else if (goog.isString(source)) { - return new ol.binary.Buffer(source); - } else { - goog.asserts.fail(); - return null; - } -}; - - -/** - * @inheritDoc - */ -ol.format.BinaryFeature.prototype.getType = function() { - return ol.format.FormatType.BINARY; -}; - - -/** - * @inheritDoc - */ -ol.format.BinaryFeature.prototype.readFeature = function(source) { - return this.readFeatureFromBuffer(ol.format.BinaryFeature.getBuffer_(source)); -}; - - -/** - * @inheritDoc - */ -ol.format.BinaryFeature.prototype.readFeatures = function(source) { - return this.readFeaturesFromBuffer( - ol.format.BinaryFeature.getBuffer_(source)); -}; - - -/** - * @param {ol.binary.Buffer} buffer Buffer. - * @protected - * @return {ol.Feature} Feature. - */ -ol.format.BinaryFeature.prototype.readFeatureFromBuffer = goog.abstractMethod; - - -/** - * @param {ol.binary.Buffer} buffer Buffer. - * @protected - * @return {Array.} Feature. - */ -ol.format.BinaryFeature.prototype.readFeaturesFromBuffer = goog.abstractMethod; - - -/** - * @inheritDoc - */ -ol.format.BinaryFeature.prototype.readGeometry = function(source) { - return this.readGeometryFromBuffer( - ol.format.BinaryFeature.getBuffer_(source)); -}; - - -/** - * @param {ol.binary.Buffer} buffer Buffer. - * @protected - * @return {ol.geom.Geometry} Geometry. - */ -ol.format.BinaryFeature.prototype.readGeometryFromBuffer = goog.abstractMethod; - - -/** - * @inheritDoc - */ -ol.format.BinaryFeature.prototype.readProjection = function(source) { - return this.readProjectionFromBuffer( - ol.format.BinaryFeature.getBuffer_(source)); -}; - - -/** - * @param {ol.binary.Buffer} buffer Buffer. - * @return {ol.proj.Projection} Projection. - */ -ol.format.BinaryFeature.prototype.readProjectionFromBuffer = - goog.abstractMethod; diff --git a/src/ol/format/featureformat.js b/src/ol/format/featureformat.js index d06f7a1b51..d480625e80 100644 --- a/src/ol/format/featureformat.js +++ b/src/ol/format/featureformat.js @@ -85,7 +85,7 @@ ol.format.Feature.prototype.getType = goog.abstractMethod; /** * Read a single feature from a source. * - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {ol.Feature} Feature. */ @@ -95,7 +95,7 @@ ol.format.Feature.prototype.readFeature = goog.abstractMethod; /** * Read all features from a source. * - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {Array.} Features. */ @@ -105,7 +105,7 @@ ol.format.Feature.prototype.readFeatures = goog.abstractMethod; /** * Read a single geometry from a source. * - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {ol.geom.Geometry} Geometry. */ @@ -115,7 +115,7 @@ ol.format.Feature.prototype.readGeometry = goog.abstractMethod; /** * Read the projection from a source. * - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @return {ol.proj.Projection} Projection. */ ol.format.Feature.prototype.readProjection = goog.abstractMethod; diff --git a/src/ol/format/format.js b/src/ol/format/format.js index bdedb916d1..e0cca0fdae 100644 --- a/src/ol/format/format.js +++ b/src/ol/format/format.js @@ -5,7 +5,6 @@ goog.provide('ol.format.FormatType'); * @enum {string} */ ol.format.FormatType = { - BINARY: 'binary', JSON: 'json', TEXT: 'text', XML: 'xml' diff --git a/src/ol/format/geojsonformat.js b/src/ol/format/geojsonformat.js index 86547147b3..592c55930b 100644 --- a/src/ol/format/geojsonformat.js +++ b/src/ol/format/geojsonformat.js @@ -376,7 +376,7 @@ ol.format.GeoJSON.prototype.getExtensions = function() { * use `readFeatures` to read FeatureCollection source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {ol.Feature} Feature. * @api stable @@ -389,7 +389,7 @@ ol.format.GeoJSON.prototype.readFeature; * FeatureCollection sources. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {Array.} Features. * @api stable @@ -453,7 +453,7 @@ ol.format.GeoJSON.prototype.readFeaturesFromObject = function( * Read a geometry from a GeoJSON source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {ol.geom.Geometry} Geometry. * @api stable @@ -475,7 +475,7 @@ ol.format.GeoJSON.prototype.readGeometryFromObject = function( * Read the projection from a GeoJSON source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @return {ol.proj.Projection} Projection. * @api stable */ diff --git a/src/ol/format/gml/gmlbaseformat.js b/src/ol/format/gml/gmlbaseformat.js index 4cf69833be..c6da053a46 100644 --- a/src/ol/format/gml/gmlbaseformat.js +++ b/src/ol/format/gml/gmlbaseformat.js @@ -590,7 +590,7 @@ ol.format.GMLBase.prototype.readGeometryFromNode = * Read all features from a GML FeatureCollection. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Options. * @return {Array.} Features. * @api stable diff --git a/src/ol/format/gpxformat.js b/src/ol/format/gpxformat.js index 74868da1b9..0d07c74754 100644 --- a/src/ol/format/gpxformat.js +++ b/src/ol/format/gpxformat.js @@ -438,7 +438,7 @@ ol.format.GPX.prototype.handleReadExtensions_ = function(features) { * Read the first feature from a GPX source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {ol.Feature} Feature. * @api stable @@ -472,7 +472,7 @@ ol.format.GPX.prototype.readFeatureFromNode = function(node, opt_options) { * Read all features from a GPX source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {Array.} Features. * @api stable @@ -508,7 +508,7 @@ ol.format.GPX.prototype.readFeaturesFromNode = function(node, opt_options) { * Read the projection from a GPX source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @return {ol.proj.Projection} Projection. * @api stable */ diff --git a/src/ol/format/igcformat.js b/src/ol/format/igcformat.js index 98ee21aaec..08fd284084 100644 --- a/src/ol/format/igcformat.js +++ b/src/ol/format/igcformat.js @@ -101,7 +101,7 @@ ol.format.IGC.prototype.getExtensions = function() { * Read the feature from the IGC source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {ol.Feature} Feature. * @api @@ -189,7 +189,7 @@ ol.format.IGC.prototype.readFeatureFromText = function(text, opt_options) { * feature, this will return the feature in an array. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {Array.} Features. * @api @@ -214,7 +214,7 @@ ol.format.IGC.prototype.readFeaturesFromText = function(text, opt_options) { * Read the projection from the IGC source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @return {ol.proj.Projection} Projection. * @api */ diff --git a/src/ol/format/kmlformat.js b/src/ol/format/kmlformat.js index e69b99d337..2d7150e3e5 100644 --- a/src/ol/format/kmlformat.js +++ b/src/ol/format/kmlformat.js @@ -1736,7 +1736,7 @@ ol.format.KML.prototype.readSharedStyleMap_ = function(node, objectStack) { * Read the first feature from a KML source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {ol.Feature} Feature. * @api stable @@ -1769,7 +1769,7 @@ ol.format.KML.prototype.readFeatureFromNode = function(node, opt_options) { * Read all features from a KML source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {Array.} Features. * @api stable @@ -1957,7 +1957,7 @@ ol.format.KML.prototype.readNetworkLinksFromNode = function(node) { * Read the projection from a KML source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @return {ol.proj.Projection} Projection. * @api stable */ diff --git a/src/ol/format/osmxmlformat.js b/src/ol/format/osmxmlformat.js index 8f7344617b..821b8f760c 100644 --- a/src/ol/format/osmxmlformat.js +++ b/src/ol/format/osmxmlformat.js @@ -203,7 +203,7 @@ ol.format.OSMXML.NODE_PARSERS_ = ol.xml.makeParsersNS( * Read all features from an OSM source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {Array.} Features. * @api stable @@ -235,7 +235,7 @@ ol.format.OSMXML.prototype.readFeaturesFromNode = function(node, opt_options) { * Read the projection from an OSM source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @return {ol.proj.Projection} Projection. * @api stable */ diff --git a/src/ol/format/polylineformat.js b/src/ol/format/polylineformat.js index d50f0ce854..a8d369d1f6 100644 --- a/src/ol/format/polylineformat.js +++ b/src/ol/format/polylineformat.js @@ -268,7 +268,7 @@ ol.format.Polyline.encodeUnsignedInteger = function(num) { * in two dimensions and in latitude, longitude order. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {ol.Feature} Feature. * @api stable @@ -290,7 +290,7 @@ ol.format.Polyline.prototype.readFeatureFromText = function(text, opt_options) { * feature, this will return the feature in an array. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {Array.} Features. * @api stable @@ -312,7 +312,7 @@ ol.format.Polyline.prototype.readFeaturesFromText = * Read the geometry from the source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {ol.geom.Geometry} Geometry. * @api stable @@ -344,7 +344,7 @@ ol.format.Polyline.prototype.readGeometryFromText = * Read the projection from a Polyline source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @return {ol.proj.Projection} Projection. * @api stable */ diff --git a/src/ol/format/topojsonformat.js b/src/ol/format/topojsonformat.js index 6174599d62..e849edd8ee 100644 --- a/src/ol/format/topojsonformat.js +++ b/src/ol/format/topojsonformat.js @@ -275,7 +275,7 @@ ol.format.TopoJSON.readFeatureFromGeometry_ = function(object, arcs, * Read all features from a TopoJSON source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @return {Array.} Features. * @api stable */ @@ -386,7 +386,7 @@ ol.format.TopoJSON.transformVertex_ = function(vertex, scale, translate) { * Read the projection from a TopoJSON source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} object Source. + * @param {Document|Node|Object|string} object Source. * @return {ol.proj.Projection} Projection. * @api stable */ diff --git a/src/ol/format/wfsformat.js b/src/ol/format/wfsformat.js index 6e17b47b32..72540c29e3 100644 --- a/src/ol/format/wfsformat.js +++ b/src/ol/format/wfsformat.js @@ -106,7 +106,7 @@ ol.format.WFS.SCHEMA_LOCATION = 'http://www.opengis.net/wfs ' + * Read all features from a WFS FeatureCollection. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {Array.} Features. * @api stable @@ -139,7 +139,7 @@ ol.format.WFS.prototype.readFeaturesFromNode = function(node, opt_options) { /** - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @return {ol.format.WFS.TransactionResponse|undefined} Transaction response. * @api stable */ @@ -160,7 +160,7 @@ ol.format.WFS.prototype.readTransactionResponse = function(source) { /** - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @return {ol.format.WFS.FeatureCollectionMetadata|undefined} * FeatureCollection metadata. * @api stable @@ -730,7 +730,7 @@ ol.format.WFS.prototype.writeTransaction = function(inserts, updates, deletes, * Read the projection from a WFS source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @return {?ol.proj.Projection} Projection. * @api stable */ diff --git a/src/ol/format/wktformat.js b/src/ol/format/wktformat.js index ce95e40045..c252bd30cd 100644 --- a/src/ol/format/wktformat.js +++ b/src/ol/format/wktformat.js @@ -209,7 +209,7 @@ ol.format.WKT.prototype.parse_ = function(wkt) { * Read a feature from a WKT source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {ol.Feature} Feature. * @api stable @@ -235,7 +235,7 @@ ol.format.WKT.prototype.readFeatureFromText = function(text, opt_options) { * Read all features from a WKT source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {Array.} Features. * @api stable @@ -270,7 +270,7 @@ ol.format.WKT.prototype.readFeaturesFromText = function(text, opt_options) { * Read a single geometry from a WKT source. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Read options. * @return {ol.geom.Geometry} Geometry. * @api stable diff --git a/src/ol/format/wmsgetfeatureinfoformat.js b/src/ol/format/wmsgetfeatureinfoformat.js index 42068075d5..8441ea2526 100644 --- a/src/ol/format/wmsgetfeatureinfoformat.js +++ b/src/ol/format/wmsgetfeatureinfoformat.js @@ -124,7 +124,7 @@ ol.format.WMSGetFeatureInfo.prototype.readFeatures_ = * Read all features from a WMSGetFeatureInfo response. * * @function - * @param {ArrayBuffer|Document|Node|Object|string} source Source. + * @param {Document|Node|Object|string} source Source. * @param {olx.format.ReadOptions=} opt_options Options. * @return {Array.} Features. * @api stable diff --git a/src/ol/has.js b/src/ol/has.js index f86249f976..b68ea55867 100644 --- a/src/ol/has.js +++ b/src/ol/has.js @@ -17,14 +17,6 @@ goog.require('ol.webgl'); ol.has.DEVICE_PIXEL_RATIO = goog.global.devicePixelRatio || 1; -/** - * True if the browser supports ArrayBuffers. - * @const - * @type {boolean} - */ -ol.has.ARRAY_BUFFER = 'ArrayBuffer' in goog.global; - - /** * True if the browser's Canvas implementation implements {get,set}LineDash. * @type {boolean} diff --git a/tasks/readme.md b/tasks/readme.md index aefbaedd63..bbd1960950 100644 --- a/tasks/readme.md +++ b/tasks/readme.md @@ -53,8 +53,7 @@ Below is a complete `build.json` configuration file that would generate a 'full' "externs/olx.js", "externs/proj4js.js", "externs/tilejson.js", - "externs/topojson.js", - "externs/vbarray.js" + "externs/topojson.js" ], "define": [ "goog.dom.ASSUME_STANDARDS_MODE=true", diff --git a/test/spec/ol/binary.test.js b/test/spec/ol/binary.test.js deleted file mode 100644 index 5b7706f30a..0000000000 --- a/test/spec/ol/binary.test.js +++ /dev/null @@ -1,16 +0,0 @@ -goog.provide('ol.test.buffer'); - -describe('ol.binary.Buffer', function() { - - describe('constructor', function() { - - it('can be constructed without arguments', function() { - var instance = new ol.binary.Buffer(); - expect(instance).to.be.an(ol.binary.Buffer); - }); - - }); - -}); - -goog.require('ol.binary.Buffer'); diff --git a/test/spec/ol/format/binaryfeatureformat.test.js b/test/spec/ol/format/binaryfeatureformat.test.js deleted file mode 100644 index 4201e1609e..0000000000 --- a/test/spec/ol/format/binaryfeatureformat.test.js +++ /dev/null @@ -1,16 +0,0 @@ -goog.provide('ol.test.format.BinaryFeature'); - -describe('ol.format.BinaryFeature', function() { - - describe('constructor', function() { - - it('can be constructed without arguments', function() { - var instance = new ol.format.BinaryFeature(); - expect(instance).to.be.an(ol.format.BinaryFeature); - }); - - }); - -}); - -goog.require('ol.format.BinaryFeature');