Allow for empty Point & GeometryCollection

This commit is contained in:
Erik Timmers
2014-07-15 12:59:26 +02:00
parent 4c03b3b35c
commit fe8a72dce5
2 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ ol.geom.Point.prototype.closestPointXY =
* @api
*/
ol.geom.Point.prototype.getCoordinates = function() {
return this.flatCoordinates.slice();
return goog.isNull(this.flatCoordinates) ? [] : this.flatCoordinates.slice();
};