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,7 +1,7 @@
|
||||
goog.provide('ol.geom.MultiPolygon');
|
||||
|
||||
goog.require('goog.array');
|
||||
goog.require('goog.asserts');
|
||||
goog.require('ol.array');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.geom.GeometryType');
|
||||
goog.require('ol.geom.MultiPoint');
|
||||
@@ -97,7 +97,7 @@ ol.geom.MultiPolygon.prototype.appendPolygon = function(polygon) {
|
||||
this.endss_.push();
|
||||
} else {
|
||||
var offset = this.flatCoordinates.length;
|
||||
ol.array.safeExtend(this.flatCoordinates, polygon.getFlatCoordinates());
|
||||
goog.array.extend(this.flatCoordinates, polygon.getFlatCoordinates());
|
||||
ends = polygon.getEnds().slice();
|
||||
var i, ii;
|
||||
for (i = 0, ii = ends.length; i < ii; ++i) {
|
||||
@@ -397,7 +397,7 @@ ol.geom.MultiPolygon.prototype.setPolygons = function(polygons) {
|
||||
for (j = 0, jj = ends.length; j < jj; ++j) {
|
||||
ends[j] += offset;
|
||||
}
|
||||
ol.array.safeExtend(flatCoordinates, polygon.getFlatCoordinates());
|
||||
goog.array.extend(flatCoordinates, polygon.getFlatCoordinates());
|
||||
endss.push(ends);
|
||||
}
|
||||
this.setFlatCoordinates(layout, flatCoordinates, endss);
|
||||
|
||||
Reference in New Issue
Block a user