Use ol.array.safeExtend in ol.geom.Polygon
This commit is contained in:
@@ -2,6 +2,7 @@ goog.provide('ol.geom.Polygon');
|
|||||||
|
|
||||||
goog.require('goog.array');
|
goog.require('goog.array');
|
||||||
goog.require('goog.asserts');
|
goog.require('goog.asserts');
|
||||||
|
goog.require('ol.array');
|
||||||
goog.require('ol.extent');
|
goog.require('ol.extent');
|
||||||
goog.require('ol.geom.GeometryType');
|
goog.require('ol.geom.GeometryType');
|
||||||
goog.require('ol.geom.LinearRing');
|
goog.require('ol.geom.LinearRing');
|
||||||
@@ -85,7 +86,7 @@ ol.geom.Polygon.prototype.appendLinearRing = function(linearRing) {
|
|||||||
if (goog.isNull(this.flatCoordinates)) {
|
if (goog.isNull(this.flatCoordinates)) {
|
||||||
this.flatCoordinates = linearRing.getFlatCoordinates().slice();
|
this.flatCoordinates = linearRing.getFlatCoordinates().slice();
|
||||||
} else {
|
} else {
|
||||||
goog.array.extend(this.flatCoordinates, linearRing.getFlatCoordinates());
|
ol.array.safeExtend(this.flatCoordinates, linearRing.getFlatCoordinates());
|
||||||
}
|
}
|
||||||
this.ends_.push(this.flatCoordinates.length);
|
this.ends_.push(this.flatCoordinates.length);
|
||||||
this.dispatchChangeEvent();
|
this.dispatchChangeEvent();
|
||||||
|
|||||||
Reference in New Issue
Block a user