Allow instanceof checks for geometries

This commit is contained in:
Tim Schaub
2013-02-19 23:21:05 -07:00
parent 083404bd58
commit 0015e466dc
11 changed files with 30 additions and 6 deletions

View File

@@ -10,12 +10,14 @@ goog.require('ol.geom.GeometryType');
/**
* @constructor
* @implements {ol.geom.Geometry}
* @extends {ol.geom.Geometry}
* @param {ol.geom.CoordinateArray} coordinates Coordinates array (e.g.
* [[x0, y0], [x1, y1]]).
*/
ol.geom.LineString = function(coordinates) {
goog.base(this);
// assume the same dimension for all coordinates
var dimension = coordinates[0].length,
count = coordinates.length,
@@ -43,6 +45,7 @@ ol.geom.LineString = function(coordinates) {
this.bounds_ = null;
};
goog.inherits(ol.geom.LineString, ol.geom.Geometry);
/**