Defaults for the Layer, Source and Feature generics
This commit is contained in:
@@ -1007,8 +1007,7 @@ function createFeatureStyleFunction(
|
||||
if (drawName) {
|
||||
const geometry = feature.getGeometry();
|
||||
if (geometry) {
|
||||
const type = geometry.getType();
|
||||
if (type === GeometryType.GEOMETRY_COLLECTION) {
|
||||
if (geometry instanceof GeometryCollection) {
|
||||
multiGeometryPoints = geometry
|
||||
.getGeometriesArrayRecursive()
|
||||
.filter(function (geometry) {
|
||||
@@ -1020,6 +1019,7 @@ function createFeatureStyleFunction(
|
||||
});
|
||||
drawName = multiGeometryPoints.length > 0;
|
||||
} else {
|
||||
const type = geometry.getType();
|
||||
drawName =
|
||||
type === GeometryType.POINT || type === GeometryType.MULTI_POINT;
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ class Polyline extends TextFeature {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {import("../Feature.js").default} feature Features.
|
||||
* @param {import("../Feature.js").default<LineString>} feature Features.
|
||||
* @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
|
||||
* @protected
|
||||
* @return {string} Text.
|
||||
@@ -126,7 +126,7 @@ class Polyline extends TextFeature {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Array<import("../Feature.js").default>} features Features.
|
||||
* @param {Array<import("../Feature.js").default<LineString>>} features Features.
|
||||
* @param {import("./Feature.js").WriteOptions} [opt_options] Write options.
|
||||
* @protected
|
||||
* @return {string} Text.
|
||||
|
||||
Reference in New Issue
Block a user