Geometry type enumeration
This commit is contained in:
@@ -2,6 +2,7 @@ goog.require('ol.Extent');
|
||||
goog.provide('ol.geom.Coordinate');
|
||||
goog.provide('ol.geom.CoordinateArray');
|
||||
goog.provide('ol.geom.Geometry');
|
||||
goog.provide('ol.geom.GeometryType');
|
||||
|
||||
|
||||
|
||||
@@ -25,6 +26,13 @@ ol.geom.Geometry.prototype.dimension;
|
||||
ol.geom.Geometry.prototype.getBounds = goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* Get the geometry type.
|
||||
* @return {ol.geom.GeometryType} The geometry type.
|
||||
*/
|
||||
ol.geom.Geometry.prototype.getType = function() {};
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {Array.<number>}
|
||||
*/
|
||||
@@ -35,3 +43,16 @@ ol.geom.Coordinate;
|
||||
* @typedef {Array.<ol.geom.Coordinate>}
|
||||
*/
|
||||
ol.geom.CoordinateArray;
|
||||
|
||||
|
||||
/**
|
||||
* @enum {string}
|
||||
*/
|
||||
ol.geom.GeometryType = {
|
||||
POINT: 'point',
|
||||
LINESTRING: 'linestring',
|
||||
POLYGON: 'polygon',
|
||||
MULTIPOINT: 'multipoint',
|
||||
MULTILINESTRING: 'multilinestring',
|
||||
MULTIPOLYGON: 'multipolygon'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user