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