Fix typing errors.
This commit is contained in:
@@ -563,7 +563,7 @@ class PluggableMap extends BaseObject {
|
||||
* @param {AtPixelOptions} [opt_options] Optional options.
|
||||
* @return {T|undefined} Callback result, i.e. the return value of last
|
||||
* callback execution, or the first truthy callback return value.
|
||||
* @template S,T
|
||||
* @template T
|
||||
* @api
|
||||
*/
|
||||
forEachFeatureAtPixel(pixel, callback, opt_options) {
|
||||
|
||||
@@ -1882,8 +1882,12 @@ function readStyle(node, objectStack) {
|
||||
const geometry = feature.getGeometry();
|
||||
const type = geometry.getType();
|
||||
if (type === GeometryType.GEOMETRY_COLLECTION) {
|
||||
return new GeometryCollection(
|
||||
const collection =
|
||||
/** @type {import("../geom/GeometryCollection").default} */ (
|
||||
geometry
|
||||
);
|
||||
return new GeometryCollection(
|
||||
collection
|
||||
.getGeometriesArrayRecursive()
|
||||
.filter(function (geometry) {
|
||||
const type = geometry.getType();
|
||||
@@ -1911,8 +1915,12 @@ function readStyle(node, objectStack) {
|
||||
const geometry = feature.getGeometry();
|
||||
const type = geometry.getType();
|
||||
if (type === GeometryType.GEOMETRY_COLLECTION) {
|
||||
return new GeometryCollection(
|
||||
const collection =
|
||||
/** @type {import("../geom/GeometryCollection").default} */ (
|
||||
geometry
|
||||
);
|
||||
return new GeometryCollection(
|
||||
collection
|
||||
.getGeometriesArrayRecursive()
|
||||
.filter(function (geometry) {
|
||||
const type = geometry.getType();
|
||||
|
||||
@@ -1167,7 +1167,11 @@ class Modify extends PointerInteraction {
|
||||
map.forEachFeatureAtPixel(
|
||||
pixel,
|
||||
(feature, layer, geometry) => {
|
||||
geometry = geometry || feature.getGeometry();
|
||||
geometry =
|
||||
geometry ||
|
||||
/** @type {import("../geom/SimpleGeometry").default} */ (
|
||||
feature.getGeometry()
|
||||
);
|
||||
if (
|
||||
geometry.getType() === GeometryType.POINT &&
|
||||
includes(this.features_.getArray(), feature)
|
||||
|
||||
@@ -175,7 +175,7 @@ class MapRenderer extends Disposable {
|
||||
* @param {import("../pixel.js").Pixel} pixel Pixel.
|
||||
* @param {import("../PluggableMap.js").FrameState} frameState FrameState.
|
||||
* @param {number} hitTolerance Hit tolerance in pixels.
|
||||
* @param {function(import("../layer/Layer.js").default<import("../source/Source".).default>, (Uint8ClampedArray|Uint8Array)): T} callback Layer
|
||||
* @param {function(import("../layer/Layer.js").default<import("../source/Source").default>, (Uint8ClampedArray|Uint8Array)): T} callback Layer
|
||||
* callback.
|
||||
* @param {function(import("../layer/Layer.js").default<import("../source/Source").default>): boolean} layerFilter Layer filter
|
||||
* function, only layers which are visible and for which this function
|
||||
|
||||
Reference in New Issue
Block a user