Use imports for enum types
This commit is contained in:
@@ -558,7 +558,7 @@ function appendCoordinate(flatCoordinates, layoutOptions, node, values) {
|
||||
* @param {LayoutOptions} layoutOptions Layout options.
|
||||
* @param {Array<number>} flatCoordinates Flat coordinates.
|
||||
* @param {Array<number>=} ends Ends.
|
||||
* @return {GeometryLayout} Layout.
|
||||
* @return {import("../geom/GeometryLayout.js").default} Layout.
|
||||
*/
|
||||
function applyLayoutOptions(layoutOptions, flatCoordinates, ends) {
|
||||
let layout = GeometryLayout.XY;
|
||||
|
||||
@@ -57,10 +57,10 @@ import {transformGeometryWithOptions} from './Feature.js';
|
||||
/**
|
||||
* @typedef {Object} Vec2
|
||||
* @property {number} x
|
||||
* @property {IconAnchorUnits} xunits
|
||||
* @property {import("../style/IconAnchorUnits").default} xunits
|
||||
* @property {number} y
|
||||
* @property {IconAnchorUnits} yunits
|
||||
* @property {IconOrigin} origin
|
||||
* @property {import("../style/IconAnchorUnits").default} yunits
|
||||
* @property {import("../style/IconOrigin.js").default} origin
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -96,7 +96,7 @@ const SCHEMA_LOCATION =
|
||||
'https://developers.google.com/kml/schema/kml22gx.xsd';
|
||||
|
||||
/**
|
||||
* @type {Object<string, IconAnchorUnits>}
|
||||
* @type {Object<string, import("../style/IconAnchorUnits").default>}
|
||||
*/
|
||||
const ICON_ANCHOR_UNITS_MAP = {
|
||||
'fraction': IconAnchorUnits.FRACTION,
|
||||
@@ -212,12 +212,12 @@ export function getDefaultFillStyle() {
|
||||
let DEFAULT_IMAGE_STYLE_ANCHOR;
|
||||
|
||||
/**
|
||||
* @type {IconAnchorUnits}
|
||||
* @type {import("../style/IconAnchorUnits").default}
|
||||
*/
|
||||
let DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS;
|
||||
|
||||
/**
|
||||
* @type {IconAnchorUnits}
|
||||
* @type {import("../style/IconAnchorUnits").default}
|
||||
*/
|
||||
let DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS;
|
||||
|
||||
|
||||
@@ -421,10 +421,10 @@ function readRawFeature(pbf, layer, i) {
|
||||
* @param {number} type The raw feature's geometry type
|
||||
* @param {number} numEnds Number of ends of the flat coordinates of the
|
||||
* geometry.
|
||||
* @return {GeometryType} The geometry type.
|
||||
* @return {import("../geom/GeometryType.js").default} The geometry type.
|
||||
*/
|
||||
function getGeometryType(type, numEnds) {
|
||||
/** @type {GeometryType} */
|
||||
/** @type {import("../geom/GeometryType.js").default} */
|
||||
let geometryType;
|
||||
if (type === 1) {
|
||||
geometryType =
|
||||
|
||||
@@ -55,7 +55,7 @@ class Polyline extends TextFeature {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {GeometryLayout}
|
||||
* @type {import("../geom/GeometryLayout").default}
|
||||
*/
|
||||
this.geometryLayout_ = options.geometryLayout
|
||||
? options.geometryLayout
|
||||
|
||||
@@ -16,7 +16,7 @@ import {transformGeometryWithOptions} from './Feature.js';
|
||||
|
||||
/**
|
||||
* Geometry constructors
|
||||
* @enum {function (new:import("../geom/Geometry.js").default, Array, GeometryLayout)}
|
||||
* @enum {function (new:import("../geom/Geometry.js").default, Array, import("../geom/GeometryLayout.js").default)}
|
||||
*/
|
||||
const GeometryConstructor = {
|
||||
'POINT': Point,
|
||||
@@ -241,7 +241,7 @@ class Parser {
|
||||
this.token_;
|
||||
|
||||
/**
|
||||
* @type {GeometryLayout}
|
||||
* @type {import("../geom/GeometryLayout.js").default}
|
||||
* @private
|
||||
*/
|
||||
this.layout_ = GeometryLayout.XY;
|
||||
@@ -290,7 +290,7 @@ class Parser {
|
||||
|
||||
/**
|
||||
* Try to parse the dimensional info.
|
||||
* @return {GeometryLayout} The layout.
|
||||
* @return {import("../geom/GeometryLayout.js").default} The layout.
|
||||
* @private
|
||||
*/
|
||||
parseGeometryLayout_() {
|
||||
|
||||
Reference in New Issue
Block a user