Add a basic geometry interface

This commit is contained in:
Marc Jansen
2012-06-22 16:05:03 +02:00
parent db3a6e9c4a
commit 5a3dad9326
2 changed files with 45 additions and 3 deletions

27
src/ol/geom/IGeometry.js Normal file
View File

@@ -0,0 +1,27 @@
goog.provide('ol.geom.IGeometry');
//goog.require('ol.geom.Point');
//goog.require('ol.Bounds');
/**
* Interface for geometry classes forcing ol.geom.* classes to implement
* expected functionality.
*
* @interface
*/
ol.geom.IGeometry = function(){};
/**
* @return {ol.geom.Point} The centroid of the geometry.
*/
ol.geom.IGeometry.prototype.getCentroid = function(){};
/**
* @return {ol.Bounds|undefined} The centroid of the geometry.
*/
ol.geom.IGeometry.prototype.getBounds = function(){};
/**
* @return {number} The area of the geometry.
*/
ol.geom.IGeometry.prototype.getArea = function(){};