Use union instead of enum for geometry type
This commit is contained in:
committed by
Andreas Hocevar
parent
04ad0e0c5a
commit
9a6f8493fb
@@ -18,6 +18,13 @@ import {get as getProjection, getTransform} from '../proj.js';
|
||||
import {memoizeOne} from '../functions.js';
|
||||
import {transform2D} from './flat/transform.js';
|
||||
|
||||
/**
|
||||
* @typedef {'Point' | 'LineString' | 'LinearRing' | 'Polygon' | 'MultiPoint' | 'MultiLineString' | 'MultiPolygon' | 'GeometryCollection' | 'Circle'} Type
|
||||
* The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,
|
||||
* `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,
|
||||
* `'GeometryCollection'`, or `'Circle'`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @type {import("../transform.js").Transform}
|
||||
*/
|
||||
@@ -237,7 +244,7 @@ class Geometry extends BaseObject {
|
||||
/**
|
||||
* Get the type of this geometry.
|
||||
* @abstract
|
||||
* @return {import("./GeometryType.js").default} Geometry type.
|
||||
* @return {Type} Geometry type.
|
||||
*/
|
||||
getType() {
|
||||
return abstract();
|
||||
|
||||
Reference in New Issue
Block a user