Use ol.array.safeExtend in ol.geom.MultiPoint
This commit is contained in:
@@ -2,6 +2,7 @@ goog.provide('ol.geom.MultiPoint');
|
|||||||
|
|
||||||
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.Point');
|
goog.require('ol.geom.Point');
|
||||||
@@ -34,7 +35,7 @@ ol.geom.MultiPoint.prototype.appendPoint = function(point) {
|
|||||||
if (goog.isNull(this.flatCoordinates)) {
|
if (goog.isNull(this.flatCoordinates)) {
|
||||||
this.flatCoordinates = point.getFlatCoordinates().slice();
|
this.flatCoordinates = point.getFlatCoordinates().slice();
|
||||||
} else {
|
} else {
|
||||||
goog.array.extend(this.flatCoordinates, point.getFlatCoordinates());
|
ol.array.safeExtend(this.flatCoordinates, point.getFlatCoordinates());
|
||||||
}
|
}
|
||||||
this.dispatchChangeEvent();
|
this.dispatchChangeEvent();
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user