Remove extra imports in jsdoc
The symbols are already imported (es6 import)
This commit is contained in:
@@ -105,10 +105,10 @@ class GML3 extends GMLBase {
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @private
|
||||
* @return {import("../geom/MultiLineString.js").default|undefined} MultiLineString.
|
||||
* @return {MultiLineString|undefined} MultiLineString.
|
||||
*/
|
||||
readMultiCurve_(node, objectStack) {
|
||||
/** @type {Array<import("../geom/LineString.js").default>} */
|
||||
/** @type {Array<LineString>} */
|
||||
const lineStrings = pushParseAndPop([],
|
||||
this.MULTICURVE_PARSERS_, node, objectStack, this);
|
||||
if (lineStrings) {
|
||||
@@ -123,10 +123,10 @@ class GML3 extends GMLBase {
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @private
|
||||
* @return {import("../geom/MultiPolygon.js").default|undefined} MultiPolygon.
|
||||
* @return {MultiPolygon|undefined} MultiPolygon.
|
||||
*/
|
||||
readMultiSurface_(node, objectStack) {
|
||||
/** @type {Array<import("../geom/Polygon.js").default>} */
|
||||
/** @type {Array<Polygon>} */
|
||||
const polygons = pushParseAndPop([],
|
||||
this.MULTISURFACE_PARSERS_, node, objectStack, this);
|
||||
if (polygons) {
|
||||
@@ -234,7 +234,7 @@ class GML3 extends GMLBase {
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @private
|
||||
* @return {import("../geom/Polygon.js").default|undefined} Polygon.
|
||||
* @return {Polygon|undefined} Polygon.
|
||||
*/
|
||||
readSurface_(node, objectStack) {
|
||||
/** @type {Array<Array<number>>} */
|
||||
@@ -258,7 +258,7 @@ class GML3 extends GMLBase {
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @private
|
||||
* @return {import("../geom/LineString.js").default|undefined} LineString.
|
||||
* @return {LineString|undefined} LineString.
|
||||
*/
|
||||
readCurve_(node, objectStack) {
|
||||
/** @type {Array<number>} */
|
||||
@@ -436,7 +436,7 @@ class GML3 extends GMLBase {
|
||||
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {import("../geom/LineString.js").default|import("../geom/LinearRing.js").default} value Geometry.
|
||||
* @param {LineString|import("../geom/LinearRing.js").default} value Geometry.
|
||||
* @param {Array<*>} objectStack Node stack.
|
||||
* @private
|
||||
*/
|
||||
@@ -532,7 +532,7 @@ class GML3 extends GMLBase {
|
||||
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {import("../geom/Polygon.js").default} geometry Polygon geometry.
|
||||
* @param {Polygon} geometry Polygon geometry.
|
||||
* @param {Array<*>} objectStack Node stack.
|
||||
* @private
|
||||
*/
|
||||
@@ -560,7 +560,7 @@ class GML3 extends GMLBase {
|
||||
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {import("../geom/LineString.js").default} geometry LineString geometry.
|
||||
* @param {LineString} geometry LineString geometry.
|
||||
* @param {Array<*>} objectStack Node stack.
|
||||
* @private
|
||||
*/
|
||||
@@ -585,7 +585,7 @@ class GML3 extends GMLBase {
|
||||
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {import("../geom/MultiPolygon.js").default} geometry MultiPolygon geometry.
|
||||
* @param {MultiPolygon} geometry MultiPolygon geometry.
|
||||
* @param {Array<*>} objectStack Node stack.
|
||||
* @private
|
||||
*/
|
||||
@@ -626,7 +626,7 @@ class GML3 extends GMLBase {
|
||||
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {import("../geom/MultiLineString.js").default} geometry MultiLineString geometry.
|
||||
* @param {MultiLineString} geometry MultiLineString geometry.
|
||||
* @param {Array<*>} objectStack Node stack.
|
||||
* @private
|
||||
*/
|
||||
@@ -659,7 +659,7 @@ class GML3 extends GMLBase {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {import("../geom/Polygon.js").default} polygon Polygon geometry.
|
||||
* @param {Polygon} polygon Polygon geometry.
|
||||
* @param {Array<*>} objectStack Node stack.
|
||||
* @private
|
||||
*/
|
||||
@@ -686,7 +686,7 @@ class GML3 extends GMLBase {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {import("../geom/LineString.js").default} line LineString geometry.
|
||||
* @param {LineString} line LineString geometry.
|
||||
* @param {Array<*>} objectStack Node stack.
|
||||
* @private
|
||||
*/
|
||||
@@ -700,7 +700,7 @@ class GML3 extends GMLBase {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {import("../geom/Polygon.js").default} polygon Polygon geometry.
|
||||
* @param {Polygon} polygon Polygon geometry.
|
||||
* @param {Array<*>} objectStack Node stack.
|
||||
* @private
|
||||
*/
|
||||
@@ -712,7 +712,7 @@ class GML3 extends GMLBase {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {import("../geom/LineString.js").default} line LineString geometry.
|
||||
* @param {LineString} line LineString geometry.
|
||||
* @param {Array<*>} objectStack Node stack.
|
||||
* @private
|
||||
*/
|
||||
|
||||
@@ -132,7 +132,7 @@ class GMLBase extends XMLFeature {
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {Array<import("../Feature.js").default> | undefined} Features.
|
||||
* @return {Array<Feature> | undefined} Features.
|
||||
*/
|
||||
readFeaturesInternal(node, objectStack) {
|
||||
const localName = node.localName;
|
||||
@@ -240,7 +240,7 @@ class GMLBase extends XMLFeature {
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {import("../Feature.js").default} Feature.
|
||||
* @return {Feature} Feature.
|
||||
*/
|
||||
readFeatureElement(node, objectStack) {
|
||||
let n;
|
||||
@@ -281,7 +281,7 @@ class GMLBase extends XMLFeature {
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {import("../geom/Point.js").default|undefined} Point.
|
||||
* @return {Point|undefined} Point.
|
||||
*/
|
||||
readPoint(node, objectStack) {
|
||||
const flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack);
|
||||
@@ -293,7 +293,7 @@ class GMLBase extends XMLFeature {
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {import("../geom/MultiPoint.js").default|undefined} MultiPoint.
|
||||
* @return {MultiPoint|undefined} MultiPoint.
|
||||
*/
|
||||
readMultiPoint(node, objectStack) {
|
||||
/** @type {Array<Array<number>>} */
|
||||
@@ -309,10 +309,10 @@ class GMLBase extends XMLFeature {
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {import("../geom/MultiLineString.js").default|undefined} MultiLineString.
|
||||
* @return {MultiLineString|undefined} MultiLineString.
|
||||
*/
|
||||
readMultiLineString(node, objectStack) {
|
||||
/** @type {Array<import("../geom/LineString.js").default>} */
|
||||
/** @type {Array<LineString>} */
|
||||
const lineStrings = pushParseAndPop([],
|
||||
this.MULTILINESTRING_PARSERS_, node, objectStack, this);
|
||||
if (lineStrings) {
|
||||
@@ -323,10 +323,10 @@ class GMLBase extends XMLFeature {
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {import("../geom/MultiPolygon.js").default|undefined} MultiPolygon.
|
||||
* @return {MultiPolygon|undefined} MultiPolygon.
|
||||
*/
|
||||
readMultiPolygon(node, objectStack) {
|
||||
/** @type {Array<import("../geom/Polygon.js").default>} */
|
||||
/** @type {Array<Polygon>} */
|
||||
const polygons = pushParseAndPop([], this.MULTIPOLYGON_PARSERS_, node, objectStack, this);
|
||||
if (polygons) {
|
||||
return new MultiPolygon(polygons);
|
||||
@@ -363,7 +363,7 @@ class GMLBase extends XMLFeature {
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {import("../geom/LineString.js").default|undefined} LineString.
|
||||
* @return {LineString|undefined} LineString.
|
||||
*/
|
||||
readLineString(node, objectStack) {
|
||||
const flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack);
|
||||
@@ -395,7 +395,7 @@ class GMLBase extends XMLFeature {
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {import("../geom/LinearRing.js").default|undefined} LinearRing.
|
||||
* @return {LinearRing|undefined} LinearRing.
|
||||
*/
|
||||
readLinearRing(node, objectStack) {
|
||||
const flatCoordinates = this.readFlatCoordinatesFromNode_(node, objectStack);
|
||||
@@ -407,7 +407,7 @@ class GMLBase extends XMLFeature {
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {import("../geom/Polygon.js").default|undefined} Polygon.
|
||||
* @return {Polygon|undefined} Polygon.
|
||||
*/
|
||||
readPolygon(node, objectStack) {
|
||||
/** @type {Array<Array<number>>} */
|
||||
|
||||
@@ -38,7 +38,7 @@ const SCHEMA_LOCATION = 'http://www.topografix.com/GPX/1/1 ' +
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {Object<string, function(Node, Array<*>): (import("../Feature.js").default|undefined)>}
|
||||
* @type {Object<string, function(Node, Array<*>): (Feature|undefined)>}
|
||||
*/
|
||||
const FEATURE_READER = {
|
||||
'rte': readRte,
|
||||
@@ -84,7 +84,7 @@ const GPX_SERIALIZERS = makeStructureNS(
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {function(import("../Feature.js").default, Node)} [readExtensions] Callback function
|
||||
* @property {function(Feature, Node)} [readExtensions] Callback function
|
||||
* to process `extensions` nodes. To prevent memory leaks, this callback function must
|
||||
* not store any references to the node. Note that the `extensions`
|
||||
* node is not allowed in GPX 1.0. Moreover, only `extensions`
|
||||
@@ -131,14 +131,14 @@ class GPX extends XMLFeature {
|
||||
this.dataProjection = getProjection('EPSG:4326');
|
||||
|
||||
/**
|
||||
* @type {function(import("../Feature.js").default, Node)|undefined}
|
||||
* @type {function(Feature, Node)|undefined}
|
||||
* @private
|
||||
*/
|
||||
this.readExtensions_ = options.readExtensions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Array<import("../Feature.js").default>} features List of features.
|
||||
* @param {Array<Feature>} features List of features.
|
||||
* @private
|
||||
*/
|
||||
handleReadExtensions_(features) {
|
||||
@@ -182,7 +182,7 @@ class GPX extends XMLFeature {
|
||||
return [];
|
||||
}
|
||||
if (node.localName == 'gpx') {
|
||||
/** @type {Array<import("../Feature.js").default>} */
|
||||
/** @type {Array<Feature>} */
|
||||
const features = pushParseAndPop([], GPX_PARSERS,
|
||||
node, [this.getReadOptions(node, opt_options)]);
|
||||
if (features) {
|
||||
@@ -200,7 +200,7 @@ class GPX extends XMLFeature {
|
||||
* LineString geometries are output as routes (`<rte>`), and MultiLineString
|
||||
* as tracks (`<trk>`).
|
||||
*
|
||||
* @param {Array<import("../Feature.js").default>} features Features.
|
||||
* @param {Array<Feature>} features Features.
|
||||
* @param {import("./Feature.js").WriteOptions=} opt_options Options.
|
||||
* @return {Node} Node.
|
||||
* @override
|
||||
@@ -475,7 +475,7 @@ const GEOMETRY_TYPE_TO_NODENAME = {
|
||||
* @return {Node|undefined} Node.
|
||||
*/
|
||||
function GPX_NODE_FACTORY(value, objectStack, opt_nodeName) {
|
||||
const geometry = /** @type {import("../Feature.js").default} */ (value).getGeometry();
|
||||
const geometry = /** @type {Feature} */ (value).getGeometry();
|
||||
if (geometry) {
|
||||
const nodeName = GEOMETRY_TYPE_TO_NODENAME[geometry.getType()];
|
||||
if (nodeName) {
|
||||
@@ -522,7 +522,7 @@ function appendCoordinate(flatCoordinates, layoutOptions, node, values) {
|
||||
* @param {LayoutOptions} layoutOptions Layout options.
|
||||
* @param {Array<number>} flatCoordinates Flat coordinates.
|
||||
* @param {Array<number>=} ends Ends.
|
||||
* @return {import("../geom/GeometryLayout.js").default} Layout.
|
||||
* @return {GeometryLayout} Layout.
|
||||
*/
|
||||
function applyLayoutOptions(layoutOptions, flatCoordinates, ends) {
|
||||
let layout = GeometryLayout.XY;
|
||||
@@ -630,7 +630,7 @@ function parseTrkSeg(node, objectStack) {
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {import("../Feature.js").default|undefined} Track.
|
||||
* @return {Feature|undefined} Track.
|
||||
*/
|
||||
function readRte(node, objectStack) {
|
||||
const options = /** @type {import("./Feature.js").ReadOptions} */ (objectStack[0]);
|
||||
@@ -658,7 +658,7 @@ function readRte(node, objectStack) {
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {import("../Feature.js").default|undefined} Track.
|
||||
* @return {Feature|undefined} Track.
|
||||
*/
|
||||
function readTrk(node, objectStack) {
|
||||
const options = /** @type {import("./Feature.js").ReadOptions} */ (objectStack[0]);
|
||||
@@ -689,7 +689,7 @@ function readTrk(node, objectStack) {
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {import("../Feature.js").default|undefined} Waypoint.
|
||||
* @return {Feature|undefined} Waypoint.
|
||||
*/
|
||||
function readWpt(node, objectStack) {
|
||||
const options = /** @type {import("./Feature.js").ReadOptions} */ (objectStack[0]);
|
||||
@@ -773,7 +773,7 @@ function writeWptType(node, coordinate, objectStack) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {import("../Feature.js").default} feature Feature.
|
||||
* @param {Feature} feature Feature.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
*/
|
||||
function writeRte(node, feature, objectStack) {
|
||||
@@ -782,7 +782,7 @@ function writeRte(node, feature, objectStack) {
|
||||
const context = {node: node, 'properties': properties};
|
||||
let geometry = feature.getGeometry();
|
||||
if (geometry) {
|
||||
geometry = /** @type {import("../geom/LineString.js").default} */ (transformWithOptions(geometry, true, options));
|
||||
geometry = /** @type {LineString} */ (transformWithOptions(geometry, true, options));
|
||||
context['geometryLayout'] = geometry.getLayout();
|
||||
properties['rtept'] = geometry.getCoordinates();
|
||||
}
|
||||
@@ -797,7 +797,7 @@ function writeRte(node, feature, objectStack) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {import("../Feature.js").default} feature Feature.
|
||||
* @param {Feature} feature Feature.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
*/
|
||||
function writeTrk(node, feature, objectStack) {
|
||||
@@ -807,7 +807,7 @@ function writeTrk(node, feature, objectStack) {
|
||||
const context = {node: node, 'properties': properties};
|
||||
let geometry = feature.getGeometry();
|
||||
if (geometry) {
|
||||
geometry = /** @type {import("../geom/MultiLineString.js").default} */
|
||||
geometry = /** @type {MultiLineString} */
|
||||
(transformWithOptions(geometry, true, options));
|
||||
properties['trkseg'] = geometry.getLineStrings();
|
||||
}
|
||||
@@ -822,7 +822,7 @@ function writeTrk(node, feature, objectStack) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {import("../geom/LineString.js").default} lineString LineString.
|
||||
* @param {LineString} lineString LineString.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
*/
|
||||
function writeTrkSeg(node, lineString, objectStack) {
|
||||
@@ -837,7 +837,7 @@ function writeTrkSeg(node, lineString, objectStack) {
|
||||
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {import("../Feature.js").default} feature Feature.
|
||||
* @param {Feature} feature Feature.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
*/
|
||||
function writeWpt(node, feature, objectStack) {
|
||||
@@ -846,7 +846,7 @@ function writeWpt(node, feature, objectStack) {
|
||||
context['properties'] = feature.getProperties();
|
||||
let geometry = feature.getGeometry();
|
||||
if (geometry) {
|
||||
geometry = /** @type {import("../geom/Point.js").default} */
|
||||
geometry = /** @type {Point} */
|
||||
(transformWithOptions(geometry, true, options));
|
||||
context['geometryLayout'] = geometry.getLayout();
|
||||
writeWptType(node, geometry.getCoordinates(), objectStack);
|
||||
|
||||
@@ -35,10 +35,10 @@ import {createElementNS, getAllTextContent, isDocument, isNode, makeArrayExtende
|
||||
/**
|
||||
* @typedef {Object} Vec2
|
||||
* @property {number} x
|
||||
* @property {import("../style/IconAnchorUnits.js").default} xunits
|
||||
* @property {IconAnchorUnits} xunits
|
||||
* @property {number} y
|
||||
* @property {import("../style/IconAnchorUnits.js").default} yunits
|
||||
* @property {import("../style/IconOrigin.js").default} origin
|
||||
* @property {IconAnchorUnits} yunits
|
||||
* @property {IconOrigin} origin
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -79,7 +79,7 @@ const SCHEMA_LOCATION = 'http://www.opengis.net/kml/2.2 ' +
|
||||
|
||||
|
||||
/**
|
||||
* @type {Object<string, import("../style/IconAnchorUnits.js").default>}
|
||||
* @type {Object<string, IconAnchorUnits>}
|
||||
*/
|
||||
const ICON_ANCHOR_UNITS_MAP = {
|
||||
'fraction': IconAnchorUnits.FRACTION,
|
||||
@@ -190,13 +190,13 @@ const KML_SERIALIZERS = makeStructureNS(
|
||||
let DEFAULT_COLOR;
|
||||
|
||||
/**
|
||||
* @type {import("../style/Fill.js").default}
|
||||
* @type {Fill}
|
||||
*/
|
||||
let DEFAULT_FILL_STYLE = null;
|
||||
|
||||
/**
|
||||
* Get the default fill style (or null if not yet set).
|
||||
* @return {import("../style/Fill.js").default} The default fill style.
|
||||
* @return {Fill} The default fill style.
|
||||
*/
|
||||
export function getDefaultFillStyle() {
|
||||
return DEFAULT_FILL_STYLE;
|
||||
@@ -208,12 +208,12 @@ export function getDefaultFillStyle() {
|
||||
let DEFAULT_IMAGE_STYLE_ANCHOR;
|
||||
|
||||
/**
|
||||
* @type {import("../style/IconAnchorUnits.js").default}
|
||||
* @type {IconAnchorUnits}
|
||||
*/
|
||||
let DEFAULT_IMAGE_STYLE_ANCHOR_X_UNITS;
|
||||
|
||||
/**
|
||||
* @type {import("../style/IconAnchorUnits.js").default}
|
||||
* @type {IconAnchorUnits}
|
||||
*/
|
||||
let DEFAULT_IMAGE_STYLE_ANCHOR_Y_UNITS;
|
||||
|
||||
@@ -251,57 +251,57 @@ export function getDefaultImageStyle() {
|
||||
let DEFAULT_NO_IMAGE_STYLE;
|
||||
|
||||
/**
|
||||
* @type {import("../style/Stroke.js").default}
|
||||
* @type {Stroke}
|
||||
*/
|
||||
let DEFAULT_STROKE_STYLE = null;
|
||||
|
||||
/**
|
||||
* Get the default stroke style (or null if not yet set).
|
||||
* @return {import("../style/Stroke.js").default} The default stroke style.
|
||||
* @return {Stroke} The default stroke style.
|
||||
*/
|
||||
export function getDefaultStrokeStyle() {
|
||||
return DEFAULT_STROKE_STYLE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @type {import("../style/Stroke.js").default}
|
||||
* @type {Stroke}
|
||||
*/
|
||||
let DEFAULT_TEXT_STROKE_STYLE;
|
||||
|
||||
/**
|
||||
* @type {import("../style/Text.js").default}
|
||||
* @type {Text}
|
||||
*/
|
||||
let DEFAULT_TEXT_STYLE = null;
|
||||
|
||||
/**
|
||||
* Get the default text style (or null if not yet set).
|
||||
* @return {import("../style/Text.js").default} The default text style.
|
||||
* @return {Text} The default text style.
|
||||
*/
|
||||
export function getDefaultTextStyle() {
|
||||
return DEFAULT_TEXT_STYLE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @type {import("../style/Style.js").default}
|
||||
* @type {Style}
|
||||
*/
|
||||
let DEFAULT_STYLE = null;
|
||||
|
||||
/**
|
||||
* Get the default style (or null if not yet set).
|
||||
* @return {import("../style/Style.js").default} The default style.
|
||||
* @return {Style} The default style.
|
||||
*/
|
||||
export function getDefaultStyle() {
|
||||
return DEFAULT_STYLE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @type {Array<import("../style/Style.js").default>}
|
||||
* @type {Array<Style>}
|
||||
*/
|
||||
let DEFAULT_STYLE_ARRAY = null;
|
||||
|
||||
/**
|
||||
* Get the default style array (or null if not yet set).
|
||||
* @return {Array<import("../style/Style.js").default>} The default style.
|
||||
* @return {Array<Style>} The default style.
|
||||
*/
|
||||
export function getDefaultStyleArray() {
|
||||
return DEFAULT_STYLE_ARRAY;
|
||||
@@ -377,7 +377,7 @@ function createStyleDefaults() {
|
||||
* @typedef {Object} Options
|
||||
* @property {boolean} [extractStyles=true] Extract styles from the KML.
|
||||
* @property {boolean} [showPointNames=true] Show names as labels for placemarks which contain points.
|
||||
* @property {Array<import("../style/Style.js").default>} [defaultStyle] Default style. The
|
||||
* @property {Array<Style>} [defaultStyle] Default style. The
|
||||
* default default style is the same as Google Earth.
|
||||
* @property {boolean} [writeStyles=true] Write styles into KML.
|
||||
*/
|
||||
@@ -420,7 +420,7 @@ class KML extends XMLFeature {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {Array<import("../style/Style.js").default>}
|
||||
* @type {Array<Style>}
|
||||
*/
|
||||
this.defaultStyle_ = options.defaultStyle ?
|
||||
options.defaultStyle : DEFAULT_STYLE_ARRAY;
|
||||
@@ -441,7 +441,7 @@ class KML extends XMLFeature {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {!Object<string, (Array<import("../style/Style.js").default>|string)>}
|
||||
* @type {!Object<string, (Array<Style>|string)>}
|
||||
*/
|
||||
this.sharedStyles_ = {};
|
||||
|
||||
@@ -458,7 +458,7 @@ class KML extends XMLFeature {
|
||||
* @param {Node} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @private
|
||||
* @return {Array<import("../Feature.js").default>|undefined} Features.
|
||||
* @return {Array<Feature>|undefined} Features.
|
||||
*/
|
||||
readDocumentOrFolder_(node, objectStack) {
|
||||
// FIXME use scope somehow
|
||||
@@ -470,7 +470,7 @@ class KML extends XMLFeature {
|
||||
'Style': this.readSharedStyle_.bind(this),
|
||||
'StyleMap': this.readSharedStyleMap_.bind(this)
|
||||
});
|
||||
/** @type {Array<import("../Feature.js").default>} */
|
||||
/** @type {Array<Feature>} */
|
||||
const features = pushParseAndPop([], parsersNS, node, objectStack, this);
|
||||
if (features) {
|
||||
return features;
|
||||
@@ -483,7 +483,7 @@ class KML extends XMLFeature {
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @private
|
||||
* @return {import("../Feature.js").default|undefined} Feature.
|
||||
* @return {Feature|undefined} Feature.
|
||||
*/
|
||||
readPlacemark_(node, objectStack) {
|
||||
const object = pushParseAndPop({'geometry': null},
|
||||
@@ -823,7 +823,7 @@ class KML extends XMLFeature {
|
||||
* Encode an array of features in the KML format as an XML node. GeometryCollections,
|
||||
* MultiPoints, MultiLineStrings, and MultiPolygons are output as MultiGeometries.
|
||||
*
|
||||
* @param {Array<import("../Feature.js").default>} features Features.
|
||||
* @param {Array<Feature>} features Features.
|
||||
* @param {import("./Feature.js").WriteOptions=} opt_options Options.
|
||||
* @return {Node} Node.
|
||||
* @override
|
||||
@@ -855,9 +855,9 @@ class KML extends XMLFeature {
|
||||
|
||||
|
||||
/**
|
||||
* @param {import("../style/Style.js").default|undefined} foundStyle Style.
|
||||
* @param {Style|undefined} foundStyle Style.
|
||||
* @param {string} name Name.
|
||||
* @return {import("../style/Style.js").default} style Style.
|
||||
* @return {Style} style Style.
|
||||
*/
|
||||
function createNameStyleFunction(foundStyle, name) {
|
||||
let textStyle = null;
|
||||
@@ -902,10 +902,10 @@ function createNameStyleFunction(foundStyle, name) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {Array<import("../style/Style.js").default>|undefined} style Style.
|
||||
* @param {Array<Style>|undefined} style Style.
|
||||
* @param {string} styleUrl Style URL.
|
||||
* @param {Array<import("../style/Style.js").default>} defaultStyle Default style.
|
||||
* @param {!Object<string, (Array<import("../style/Style.js").default>|string)>} sharedStyles Shared styles.
|
||||
* @param {Array<Style>} defaultStyle Default style.
|
||||
* @param {!Object<string, (Array<Style>|string)>} sharedStyles Shared styles.
|
||||
* @param {boolean|undefined} showPointNames true to show names for point placemarks.
|
||||
* @return {import("../style/Style.js").StyleFunction} Feature style function.
|
||||
*/
|
||||
@@ -913,13 +913,13 @@ function createFeatureStyleFunction(style, styleUrl, defaultStyle, sharedStyles,
|
||||
|
||||
return (
|
||||
/**
|
||||
* @param {import("../Feature.js").default} feature feature.
|
||||
* @param {Feature} feature feature.
|
||||
* @param {number} resolution Resolution.
|
||||
* @return {Array<import("../style/Style.js").default>} Style.
|
||||
* @return {Array<Style>} Style.
|
||||
*/
|
||||
function(feature, resolution) {
|
||||
let drawName = showPointNames;
|
||||
/** @type {import("../style/Style.js").default|undefined} */
|
||||
/** @type {Style|undefined} */
|
||||
let nameStyle;
|
||||
let name = '';
|
||||
if (drawName) {
|
||||
@@ -960,11 +960,11 @@ function createFeatureStyleFunction(style, styleUrl, defaultStyle, sharedStyles,
|
||||
|
||||
|
||||
/**
|
||||
* @param {Array<import("../style/Style.js").default>|string|undefined} styleValue Style value.
|
||||
* @param {Array<import("../style/Style.js").default>} defaultStyle Default style.
|
||||
* @param {!Object<string, (Array<import("../style/Style.js").default>|string)>} sharedStyles
|
||||
* @param {Array<Style>|string|undefined} styleValue Style value.
|
||||
* @param {Array<Style>} defaultStyle Default style.
|
||||
* @param {!Object<string, (Array<Style>|string)>} sharedStyles
|
||||
* Shared styles.
|
||||
* @return {Array<import("../style/Style.js").default>} Style.
|
||||
* @return {Array<Style>} Style.
|
||||
*/
|
||||
function findStyle(styleValue, defaultStyle, sharedStyles) {
|
||||
if (Array.isArray(styleValue)) {
|
||||
@@ -1105,7 +1105,7 @@ const STYLE_MAP_PARSERS = makeStructureNS(
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {Array<import("../style/Style.js").default>|string|undefined} StyleMap.
|
||||
* @return {Array<Style>|string|undefined} StyleMap.
|
||||
*/
|
||||
function readStyleMapValue(node, objectStack) {
|
||||
return pushParseAndPop(undefined,
|
||||
@@ -1397,7 +1397,7 @@ const GX_MULTITRACK_GEOMETRY_PARSERS = makeStructureNS(
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {import("../geom/MultiLineString.js").default|undefined} MultiLineString.
|
||||
* @return {MultiLineString|undefined} MultiLineString.
|
||||
*/
|
||||
function readGxMultiTrack(node, objectStack) {
|
||||
const lineStrings = pushParseAndPop([],
|
||||
@@ -1425,7 +1425,7 @@ const GX_TRACK_PARSERS = makeStructureNS(
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {import("../geom/LineString.js").default|undefined} LineString.
|
||||
* @return {LineString|undefined} LineString.
|
||||
*/
|
||||
function readGxTrack(node, objectStack) {
|
||||
const gxTrackObject = pushParseAndPop(
|
||||
@@ -1513,7 +1513,7 @@ const EXTRUDE_AND_ALTITUDE_MODE_PARSERS = makeStructureNS(
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {import("../geom/LineString.js").default|undefined} LineString.
|
||||
* @return {LineString|undefined} LineString.
|
||||
*/
|
||||
function readLineString(node, objectStack) {
|
||||
const properties = pushParseAndPop({},
|
||||
@@ -1534,7 +1534,7 @@ function readLineString(node, objectStack) {
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {import("../geom/Polygon.js").default|undefined} Polygon.
|
||||
* @return {Polygon|undefined} Polygon.
|
||||
*/
|
||||
function readLinearRing(node, objectStack) {
|
||||
const properties = pushParseAndPop({},
|
||||
@@ -1628,7 +1628,7 @@ function readMultiGeometry(node, objectStack) {
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {import("../geom/Point.js").default|undefined} Point.
|
||||
* @return {Point|undefined} Point.
|
||||
*/
|
||||
function readPoint(node, objectStack) {
|
||||
const properties = pushParseAndPop({},
|
||||
@@ -1660,7 +1660,7 @@ const FLAT_LINEAR_RINGS_PARSERS = makeStructureNS(
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {import("../geom/Polygon.js").default|undefined} Polygon.
|
||||
* @return {Polygon|undefined} Polygon.
|
||||
*/
|
||||
function readPolygon(node, objectStack) {
|
||||
const properties = pushParseAndPop(/** @type {Object<string,*>} */ ({}),
|
||||
@@ -1700,7 +1700,7 @@ const STYLE_PARSERS = makeStructureNS(
|
||||
/**
|
||||
* @param {Element} node Node.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @return {Array<import("../style/Style.js").default>} Style.
|
||||
* @return {Array<Style>} Style.
|
||||
*/
|
||||
function readStyle(node, objectStack) {
|
||||
const styleObject = pushParseAndPop(
|
||||
@@ -1708,7 +1708,7 @@ function readStyle(node, objectStack) {
|
||||
if (!styleObject) {
|
||||
return null;
|
||||
}
|
||||
let fillStyle = /** @type {import("../style/Fill.js").default} */
|
||||
let fillStyle = /** @type {Fill} */
|
||||
('fillStyle' in styleObject ?
|
||||
styleObject['fillStyle'] : DEFAULT_FILL_STYLE);
|
||||
const fill = /** @type {boolean|undefined} */ (styleObject['fill']);
|
||||
@@ -1721,10 +1721,10 @@ function readStyle(node, objectStack) {
|
||||
if (imageStyle == DEFAULT_NO_IMAGE_STYLE) {
|
||||
imageStyle = undefined;
|
||||
}
|
||||
const textStyle = /** @type {import("../style/Text.js").default} */
|
||||
const textStyle = /** @type {Text} */
|
||||
('textStyle' in styleObject ?
|
||||
styleObject['textStyle'] : DEFAULT_TEXT_STYLE);
|
||||
let strokeStyle = /** @type {import("../style/Stroke.js").default} */
|
||||
let strokeStyle = /** @type {Stroke} */
|
||||
('strokeStyle' in styleObject ?
|
||||
styleObject['strokeStyle'] : DEFAULT_STROKE_STYLE);
|
||||
const outline = /** @type {boolean|undefined} */
|
||||
@@ -1745,7 +1745,7 @@ function readStyle(node, objectStack) {
|
||||
/**
|
||||
* Reads an array of geometries and creates arrays for common geometry
|
||||
* properties. Then sets them to the multi geometry.
|
||||
* @param {import("../geom/MultiPoint.js").default|import("../geom/MultiLineString.js").default|import("../geom/MultiPolygon.js").default} multiGeometry A multi-geometry.
|
||||
* @param {MultiPoint|MultiLineString|MultiPolygon} multiGeometry A multi-geometry.
|
||||
* @param {Array<import("../geom/Geometry.js").default>} geometries List of geometries.
|
||||
*/
|
||||
function setCommonGeometryProperties(multiGeometry, geometries) {
|
||||
@@ -1861,10 +1861,10 @@ function pairDataParser(node, objectStack) {
|
||||
if (styleUrl) {
|
||||
objectStack[objectStack.length - 1] = styleUrl;
|
||||
}
|
||||
const Style = /** @type {import("../style/Style.js").default} */
|
||||
const style = /** @type {Style} */
|
||||
(pairObject['Style']);
|
||||
if (Style) {
|
||||
objectStack[objectStack.length - 1] = Style;
|
||||
if (style) {
|
||||
objectStack[objectStack.length - 1] = style;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2205,7 +2205,7 @@ const DOCUMENT_NODE_FACTORY = function(value, objectStack, opt_nodeName) {
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {Array<import("../Feature.js").default>} features Features.
|
||||
* @param {Array<Feature>} features Features.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @this {KML}
|
||||
*/
|
||||
@@ -2409,7 +2409,7 @@ const LABEL_STYLE_SERIALIZERS = makeStructureNS(
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {import("../style/Text.js").default} style style.
|
||||
* @param {Text} style style.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
*/
|
||||
function writeLabelStyle(node, style, objectStack) {
|
||||
@@ -2455,7 +2455,7 @@ const LINE_STYLE_SERIALIZERS = makeStructureNS(
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {import("../style/Stroke.js").default} style style.
|
||||
* @param {Stroke} style style.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
*/
|
||||
function writeLineStyle(node, style, objectStack) {
|
||||
@@ -2566,18 +2566,18 @@ function writeMultiGeometry(node, geometry, objectStack) {
|
||||
/** @type {function(*, Array<*>, string=): (Node|undefined)} */
|
||||
let factory;
|
||||
if (type == GeometryType.GEOMETRY_COLLECTION) {
|
||||
geometries = /** @type {import("../geom/GeometryCollection.js").default} */ (geometry).getGeometries();
|
||||
geometries = /** @type {GeometryCollection} */ (geometry).getGeometries();
|
||||
factory = GEOMETRY_NODE_FACTORY;
|
||||
} else if (type == GeometryType.MULTI_POINT) {
|
||||
geometries = /** @type {import("../geom/MultiPoint.js").default} */ (geometry).getPoints();
|
||||
geometries = /** @type {MultiPoint} */ (geometry).getPoints();
|
||||
factory = POINT_NODE_FACTORY;
|
||||
} else if (type == GeometryType.MULTI_LINE_STRING) {
|
||||
geometries =
|
||||
(/** @type {import("../geom/MultiLineString.js").default} */ (geometry)).getLineStrings();
|
||||
(/** @type {MultiLineString} */ (geometry)).getLineStrings();
|
||||
factory = LINE_STRING_NODE_FACTORY;
|
||||
} else if (type == GeometryType.MULTI_POLYGON) {
|
||||
geometries =
|
||||
(/** @type {import("../geom/MultiPolygon.js").default} */ (geometry)).getPolygons();
|
||||
(/** @type {MultiPolygon} */ (geometry)).getPolygons();
|
||||
factory = POLYGON_NODE_FACTORY;
|
||||
} else {
|
||||
assert(false, 39); // Unknown geometry type
|
||||
@@ -2658,7 +2658,7 @@ const EXTENDEDDATA_NODE_FACTORY = makeSimpleNodeFactory('ExtendedData');
|
||||
* FIXME currently we do serialize arbitrary/custom feature properties
|
||||
* (ExtendedData).
|
||||
* @param {Element} node Node.
|
||||
* @param {import("../Feature.js").default} feature Feature.
|
||||
* @param {Feature} feature Feature.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
* @this {KML}
|
||||
*/
|
||||
@@ -2798,7 +2798,7 @@ const OUTER_BOUNDARY_NODE_FACTORY = makeSimpleNodeFactory('outerBoundaryIs');
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {import("../geom/Polygon.js").default} polygon Polygon.
|
||||
* @param {Polygon} polygon Polygon.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
*/
|
||||
function writePolygon(node, polygon, objectStack) {
|
||||
@@ -2838,7 +2838,7 @@ const COLOR_NODE_FACTORY = makeSimpleNodeFactory('color');
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {import("../style/Fill.js").default} style Style.
|
||||
* @param {Fill} style Style.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
*/
|
||||
function writePolyStyle(node, style, objectStack) {
|
||||
@@ -2884,7 +2884,7 @@ const STYLE_SERIALIZERS = makeStructureNS(
|
||||
|
||||
/**
|
||||
* @param {Node} node Node.
|
||||
* @param {import("../style/Style.js").default} style Style.
|
||||
* @param {Style} style Style.
|
||||
* @param {Array<*>} objectStack Object stack.
|
||||
*/
|
||||
function writeStyle(node, style, objectStack) {
|
||||
|
||||
@@ -23,7 +23,7 @@ import RenderFeature from '../render/Feature.js';
|
||||
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {function((import("../geom/Geometry.js").default|Object<string,*>)=)|function(import("../geom/GeometryType.js").default,Array<number>,(Array<number>|Array<Array<number>>),Object<string,*>,number)} [featureClass]
|
||||
* @property {function((import("../geom/Geometry.js").default|Object<string,*>)=)|function(GeometryType,Array<number>,(Array<number>|Array<Array<number>>),Object<string,*>,number)} [featureClass]
|
||||
* Class for features returned by {@link module:ol/format/MVT#readFeatures}. Set to
|
||||
* {@link module:ol/Feature~Feature} to get full editing and geometry support at the cost of
|
||||
* decreased rendering performance. The default is {@link module:ol/render/Feature~RenderFeature},
|
||||
@@ -55,7 +55,7 @@ class MVT extends FeatureFormat {
|
||||
const options = opt_options ? opt_options : {};
|
||||
|
||||
/**
|
||||
* @type {import("../proj/Projection.js").default}
|
||||
* @type {Projection}
|
||||
*/
|
||||
this.dataProjection = new Projection({
|
||||
code: '',
|
||||
@@ -65,7 +65,7 @@ class MVT extends FeatureFormat {
|
||||
/**
|
||||
* @private
|
||||
* @type {function((import("../geom/Geometry.js").default|Object<string,*>)=)|
|
||||
* function(import("../geom/GeometryType.js").default,Array<number>,
|
||||
* function(GeometryType,Array<number>,
|
||||
* (Array<number>|Array<Array<number>>),Object<string,*>,number)}
|
||||
*/
|
||||
this.featureClass_ = options.featureClass ?
|
||||
@@ -167,7 +167,7 @@ class MVT extends FeatureFormat {
|
||||
* @param {Object} pbf PBF
|
||||
* @param {Object} rawFeature Raw Mapbox feature.
|
||||
* @param {import("./Feature.js").ReadOptions=} opt_options Read options.
|
||||
* @return {import("../Feature.js").default|import("../render/Feature.js").default} Feature.
|
||||
* @return {import("../Feature.js").default|RenderFeature} Feature.
|
||||
*/
|
||||
createFeature_(pbf, rawFeature, opt_options) {
|
||||
const type = rawFeature.type;
|
||||
@@ -252,7 +252,7 @@ class MVT extends FeatureFormat {
|
||||
|
||||
const pbf = new PBF(/** @type {ArrayBuffer} */ (source));
|
||||
const pbfLayers = pbf.readFields(layersPBFReader, {});
|
||||
/** @type {Array<import("../Feature.js").default|import("../render/Feature.js").default>} */
|
||||
/** @type {Array<import("../Feature.js").default|RenderFeature>} */
|
||||
const features = [];
|
||||
for (const name in pbfLayers) {
|
||||
if (layers && layers.indexOf(name) == -1) {
|
||||
@@ -397,10 +397,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 {import("../geom/GeometryType.js").default} The geometry type.
|
||||
* @return {GeometryType} The geometry type.
|
||||
*/
|
||||
function getGeometryType(type, numEnds) {
|
||||
/** @type {import("../geom/GeometryType.js").default} */
|
||||
/** @type {GeometryType} */
|
||||
let geometryType;
|
||||
if (type === 1) {
|
||||
geometryType = numEnds === 1 ?
|
||||
|
||||
@@ -16,7 +16,7 @@ import {get as getProjection} from '../proj.js';
|
||||
/**
|
||||
* @typedef {Object} Options
|
||||
* @property {number} [factor=1e5] The factor by which the coordinates values will be scaled.
|
||||
* @property {import("../geom/GeometryLayout.js").default} [geometryLayout='XY'] Layout of the
|
||||
* @property {GeometryLayout} [geometryLayout='XY'] Layout of the
|
||||
* feature geometries created by the format reader.
|
||||
*/
|
||||
|
||||
@@ -59,7 +59,7 @@ class Polyline extends TextFeature {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {import("../geom/GeometryLayout.js").default}
|
||||
* @type {GeometryLayout}
|
||||
*/
|
||||
this.geometryLayout_ = options.geometryLayout ?
|
||||
options.geometryLayout : GeometryLayout.XY;
|
||||
@@ -123,7 +123,7 @@ class Polyline extends TextFeature {
|
||||
* @inheritDoc
|
||||
*/
|
||||
writeGeometryText(geometry, opt_options) {
|
||||
geometry = /** @type {import("../geom/LineString.js").default} */
|
||||
geometry = /** @type {LineString} */
|
||||
(transformWithOptions(geometry, true, this.adaptOptions(opt_options)));
|
||||
const flatCoordinates = geometry.getFlatCoordinates();
|
||||
const stride = geometry.getStride();
|
||||
|
||||
@@ -91,7 +91,7 @@ class TopoJSON extends JSONFeature {
|
||||
if (transform) {
|
||||
transformArcs(arcs, scale, translate);
|
||||
}
|
||||
/** @type {Array<import("../Feature.js").default>} */
|
||||
/** @type {Array<Feature>} */
|
||||
const features = [];
|
||||
const topoJSONFeatures = topoJSONTopology.objects;
|
||||
const property = this.layerName_;
|
||||
@@ -181,7 +181,7 @@ function concatenateArcs(indices, arcs) {
|
||||
* @param {TopoJSONGeometry} object TopoJSON object.
|
||||
* @param {Array<number>} scale Scale for each dimension.
|
||||
* @param {Array<number>} translate Translation for each dimension.
|
||||
* @return {import("../geom/Point.js").default} Geometry.
|
||||
* @return {Point} Geometry.
|
||||
*/
|
||||
function readPointGeometry(object, scale, translate) {
|
||||
const coordinates = object.coordinates;
|
||||
@@ -198,7 +198,7 @@ function readPointGeometry(object, scale, translate) {
|
||||
* @param {TopoJSONGeometry} object TopoJSON object.
|
||||
* @param {Array<number>} scale Scale for each dimension.
|
||||
* @param {Array<number>} translate Translation for each dimension.
|
||||
* @return {import("../geom/MultiPoint.js").default} Geometry.
|
||||
* @return {MultiPoint} Geometry.
|
||||
*/
|
||||
function readMultiPointGeometry(object, scale, translate) {
|
||||
const coordinates = object.coordinates;
|
||||
@@ -216,7 +216,7 @@ function readMultiPointGeometry(object, scale, translate) {
|
||||
*
|
||||
* @param {TopoJSONGeometry} object TopoJSON object.
|
||||
* @param {Array<Array<import("../coordinate.js").Coordinate>>} arcs Array of arcs.
|
||||
* @return {import("../geom/LineString.js").default} Geometry.
|
||||
* @return {LineString} Geometry.
|
||||
*/
|
||||
function readLineStringGeometry(object, arcs) {
|
||||
const coordinates = concatenateArcs(object.arcs, arcs);
|
||||
@@ -229,7 +229,7 @@ function readLineStringGeometry(object, arcs) {
|
||||
*
|
||||
* @param {TopoJSONGeometry} object TopoJSON object.
|
||||
* @param {Array<Array<import("../coordinate.js").Coordinate>>} arcs Array of arcs.
|
||||
* @return {import("../geom/MultiLineString.js").default} Geometry.
|
||||
* @return {MultiLineString} Geometry.
|
||||
*/
|
||||
function readMultiLineStringGeometry(object, arcs) {
|
||||
const coordinates = [];
|
||||
@@ -245,7 +245,7 @@ function readMultiLineStringGeometry(object, arcs) {
|
||||
*
|
||||
* @param {TopoJSONGeometry} object TopoJSON object.
|
||||
* @param {Array<Array<import("../coordinate.js").Coordinate>>} arcs Array of arcs.
|
||||
* @return {import("../geom/Polygon.js").default} Geometry.
|
||||
* @return {Polygon} Geometry.
|
||||
*/
|
||||
function readPolygonGeometry(object, arcs) {
|
||||
const coordinates = [];
|
||||
@@ -261,7 +261,7 @@ function readPolygonGeometry(object, arcs) {
|
||||
*
|
||||
* @param {TopoJSONGeometry} object TopoJSON object.
|
||||
* @param {Array<Array<import("../coordinate.js").Coordinate>>} arcs Array of arcs.
|
||||
* @return {import("../geom/MultiPolygon.js").default} Geometry.
|
||||
* @return {MultiPolygon} Geometry.
|
||||
*/
|
||||
function readMultiPolygonGeometry(object, arcs) {
|
||||
const coordinates = [];
|
||||
@@ -291,7 +291,7 @@ function readMultiPolygonGeometry(object, arcs) {
|
||||
* object to.
|
||||
* @param {string} name Name of the `Topology`'s child object.
|
||||
* @param {import("./Feature.js").ReadOptions=} opt_options Read options.
|
||||
* @return {Array<import("../Feature.js").default>} Array of features.
|
||||
* @return {Array<Feature>} Array of features.
|
||||
*/
|
||||
function readFeaturesFromGeometryCollection(collection, arcs, scale, translate, property, name, opt_options) {
|
||||
const geometries = collection.geometries;
|
||||
@@ -315,7 +315,7 @@ function readFeaturesFromGeometryCollection(collection, arcs, scale, translate,
|
||||
* object to.
|
||||
* @param {string} name Name of the `Topology`'s child object.
|
||||
* @param {import("./Feature.js").ReadOptions=} opt_options Read options.
|
||||
* @return {import("../Feature.js").default} Feature.
|
||||
* @return {Feature} Feature.
|
||||
*/
|
||||
function readFeatureFromGeometry(object, arcs, scale, translate, property, name, opt_options) {
|
||||
let geometry;
|
||||
|
||||
@@ -83,7 +83,7 @@ const TRANSACTION_SERIALIZERS = {
|
||||
* @typedef {Object} Options
|
||||
* @property {Object<string, string>|string} [featureNS] The namespace URI used for features.
|
||||
* @property {Array<string>|string} [featureType] The feature type to parse. Only used for read operations.
|
||||
* @property {import("./GMLBase.js").default} [gmlFormat] The GML format to use to parse the response. Default is `ol/format/GML3`.
|
||||
* @property {GMLBase} [gmlFormat] The GML format to use to parse the response. Default is `ol/format/GML3`.
|
||||
* @property {string} [schemaLocation] Optional schemaLocation to use for serialization, this will override the default.
|
||||
*/
|
||||
|
||||
@@ -226,7 +226,7 @@ class WFS extends XMLFeature {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {import("./GMLBase.js").default}
|
||||
* @type {GMLBase}
|
||||
*/
|
||||
this.gmlFormat_ = options.gmlFormat ?
|
||||
options.gmlFormat : new GML3();
|
||||
|
||||
@@ -17,7 +17,7 @@ import SimpleGeometry from '../geom/SimpleGeometry.js';
|
||||
|
||||
|
||||
/**
|
||||
* @enum {function (new:import("../geom/Geometry.js").default, Array, import("../geom/GeometryLayout.js").default)}
|
||||
* @enum {function (new:import("../geom/Geometry.js").default, Array, GeometryLayout)}
|
||||
*/
|
||||
const GeometryConstructor = {
|
||||
'POINT': Point,
|
||||
@@ -249,7 +249,7 @@ class Parser {
|
||||
this.token_;
|
||||
|
||||
/**
|
||||
* @type {import("../geom/GeometryLayout.js").default}
|
||||
* @type {GeometryLayout}
|
||||
* @private
|
||||
*/
|
||||
this.layout_ = GeometryLayout.XY;
|
||||
@@ -298,7 +298,7 @@ class Parser {
|
||||
|
||||
/**
|
||||
* Try to parse the dimensional info.
|
||||
* @return {import("../geom/GeometryLayout.js").default} The layout.
|
||||
* @return {GeometryLayout} The layout.
|
||||
* @private
|
||||
*/
|
||||
parseGeometryLayout_() {
|
||||
@@ -659,7 +659,7 @@ class WKT extends TextFeature {
|
||||
const geometry = this.readGeometryFromText(text, opt_options);
|
||||
if (this.splitCollection_ &&
|
||||
geometry.getType() == GeometryType.GEOMETRY_COLLECTION) {
|
||||
geometries = (/** @type {import("../geom/GeometryCollection.js").default} */ (geometry))
|
||||
geometries = (/** @type {GeometryCollection} */ (geometry))
|
||||
.getGeometriesArray();
|
||||
} else {
|
||||
geometries = [geometry];
|
||||
@@ -724,7 +724,7 @@ class WKT extends TextFeature {
|
||||
|
||||
|
||||
/**
|
||||
* @param {import("../geom/Point.js").default} geom Point geometry.
|
||||
* @param {Point} geom Point geometry.
|
||||
* @return {string} Coordinates part of Point as WKT.
|
||||
*/
|
||||
function encodePointGeometry(geom) {
|
||||
@@ -737,7 +737,7 @@ function encodePointGeometry(geom) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {import("../geom/MultiPoint.js").default} geom MultiPoint geometry.
|
||||
* @param {MultiPoint} geom MultiPoint geometry.
|
||||
* @return {string} Coordinates part of MultiPoint as WKT.
|
||||
*/
|
||||
function encodeMultiPointGeometry(geom) {
|
||||
@@ -751,7 +751,7 @@ function encodeMultiPointGeometry(geom) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {import("../geom/GeometryCollection.js").default} geom GeometryCollection geometry.
|
||||
* @param {GeometryCollection} geom GeometryCollection geometry.
|
||||
* @return {string} Coordinates part of GeometryCollection as WKT.
|
||||
*/
|
||||
function encodeGeometryCollectionGeometry(geom) {
|
||||
@@ -765,7 +765,7 @@ function encodeGeometryCollectionGeometry(geom) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {import("../geom/LineString.js").default|import("../geom/LinearRing.js").default} geom LineString geometry.
|
||||
* @param {LineString|import("../geom/LinearRing.js").default} geom LineString geometry.
|
||||
* @return {string} Coordinates part of LineString as WKT.
|
||||
*/
|
||||
function encodeLineStringGeometry(geom) {
|
||||
@@ -779,7 +779,7 @@ function encodeLineStringGeometry(geom) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {import("../geom/MultiLineString.js").default} geom MultiLineString geometry.
|
||||
* @param {MultiLineString} geom MultiLineString geometry.
|
||||
* @return {string} Coordinates part of MultiLineString as WKT.
|
||||
*/
|
||||
function encodeMultiLineStringGeometry(geom) {
|
||||
@@ -793,7 +793,7 @@ function encodeMultiLineStringGeometry(geom) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {import("../geom/Polygon.js").default} geom Polygon geometry.
|
||||
* @param {Polygon} geom Polygon geometry.
|
||||
* @return {string} Coordinates part of Polygon as WKT.
|
||||
*/
|
||||
function encodePolygonGeometry(geom) {
|
||||
@@ -807,7 +807,7 @@ function encodePolygonGeometry(geom) {
|
||||
|
||||
|
||||
/**
|
||||
* @param {import("../geom/MultiPolygon.js").default} geom MultiPolygon geometry.
|
||||
* @param {MultiPolygon} geom MultiPolygon geometry.
|
||||
* @return {string} Coordinates part of MultiPolygon as WKT.
|
||||
*/
|
||||
function encodeMultiPolygonGeometry(geom) {
|
||||
@@ -820,7 +820,7 @@ function encodeMultiPolygonGeometry(geom) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import("../geom/SimpleGeometry.js").default} geom SimpleGeometry geometry.
|
||||
* @param {SimpleGeometry} geom SimpleGeometry geometry.
|
||||
* @return {string} Potential dimensional information for WKT type.
|
||||
*/
|
||||
function encodeGeometryLayout(geom) {
|
||||
|
||||
@@ -54,7 +54,7 @@ class WMSGetFeatureInfo extends XMLFeature {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {import("./GML2.js").default}
|
||||
* @type {GML2}
|
||||
*/
|
||||
this.gmlFormat_ = new GML2();
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class WMTSCapabilities extends XML {
|
||||
super();
|
||||
|
||||
/**
|
||||
* @type {import("./OWS.js").default}
|
||||
* @type {OWS}
|
||||
* @private
|
||||
*/
|
||||
this.owsParser_ = new OWS();
|
||||
|
||||
Reference in New Issue
Block a user