Use goog.array.extend instead of ol.array.safeExtend
The upstream implementation now supports large arrays. See https://github.com/google/closure-library/pull/356
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
goog.provide('ol.format.GML');
|
||||
goog.provide('ol.format.GML3');
|
||||
|
||||
goog.require('goog.array');
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.dom');
|
||||
goog.require('goog.dom.NodeType');
|
||||
goog.require('goog.object');
|
||||
goog.require('ol.Feature');
|
||||
goog.require('ol.array');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.format.Feature');
|
||||
goog.require('ol.format.GMLBase');
|
||||
@@ -283,7 +283,7 @@ ol.format.GML3.prototype.readSurface_ = function(node, objectStack) {
|
||||
var ends = [flatCoordinates.length];
|
||||
var i, ii;
|
||||
for (i = 1, ii = flatLinearRings.length; i < ii; ++i) {
|
||||
ol.array.safeExtend(flatCoordinates, flatLinearRings[i]);
|
||||
goog.array.extend(flatCoordinates, flatLinearRings[i]);
|
||||
ends.push(flatCoordinates.length);
|
||||
}
|
||||
polygon.setFlatCoordinates(
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
// envelopes/extents, only geometries!
|
||||
goog.provide('ol.format.GMLBase');
|
||||
|
||||
goog.require('goog.array');
|
||||
goog.require('goog.asserts');
|
||||
goog.require('goog.dom');
|
||||
goog.require('goog.dom.NodeType');
|
||||
goog.require('goog.object');
|
||||
goog.require('goog.string');
|
||||
goog.require('ol.Feature');
|
||||
goog.require('ol.array');
|
||||
goog.require('ol.format.Feature');
|
||||
goog.require('ol.format.XMLFeature');
|
||||
goog.require('ol.geom.Geometry');
|
||||
@@ -390,7 +390,7 @@ ol.format.GMLBase.prototype.readPolygon = function(node, objectStack) {
|
||||
var ends = [flatCoordinates.length];
|
||||
var i, ii;
|
||||
for (i = 1, ii = flatLinearRings.length; i < ii; ++i) {
|
||||
ol.array.safeExtend(flatCoordinates, flatLinearRings[i]);
|
||||
goog.array.extend(flatCoordinates, flatLinearRings[i]);
|
||||
ends.push(flatCoordinates.length);
|
||||
}
|
||||
polygon.setFlatCoordinates(
|
||||
|
||||
@@ -14,7 +14,6 @@ goog.require('goog.math');
|
||||
goog.require('goog.object');
|
||||
goog.require('goog.string');
|
||||
goog.require('ol.Feature');
|
||||
goog.require('ol.array');
|
||||
goog.require('ol.color');
|
||||
goog.require('ol.feature');
|
||||
goog.require('ol.format.Feature');
|
||||
@@ -850,7 +849,7 @@ ol.format.KML.readMultiGeometry_ = function(node, objectStack) {
|
||||
geometry = geometries[i];
|
||||
goog.asserts.assertInstanceof(geometry, ol.geom.Point);
|
||||
goog.asserts.assert(geometry.getLayout() == layout);
|
||||
ol.array.safeExtend(flatCoordinates, geometry.getFlatCoordinates());
|
||||
goog.array.extend(flatCoordinates, geometry.getFlatCoordinates());
|
||||
}
|
||||
var multiPoint = new ol.geom.MultiPoint(null);
|
||||
multiPoint.setFlatCoordinates(layout, flatCoordinates);
|
||||
@@ -916,7 +915,7 @@ ol.format.KML.readPolygon_ = function(node, objectStack) {
|
||||
var ends = [flatCoordinates.length];
|
||||
var i, ii;
|
||||
for (i = 1, ii = flatLinearRings.length; i < ii; ++i) {
|
||||
ol.array.safeExtend(flatCoordinates, flatLinearRings[i]);
|
||||
goog.array.extend(flatCoordinates, flatLinearRings[i]);
|
||||
ends.push(flatCoordinates.length);
|
||||
}
|
||||
polygon.setFlatCoordinates(
|
||||
|
||||
Reference in New Issue
Block a user