From 36485752a40461964d8a67373d78d5d64a5aeb25 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 11:54:54 +0000 Subject: [PATCH] build(deps): bump ol from 9.1.0 to 9.2.4 (#490) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Dafydd Llŷr Pearson --- .gitignore | 1 + package.json | 2 +- pnpm-lock.yaml | 26 +++++++++++++------------- src/components/my-map/index.ts | 7 ++++--- src/components/my-map/layers.ts | 7 +++++-- src/components/my-map/snapping.ts | 6 ++++-- 6 files changed, 28 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index d283f05..b60be4c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ pitsby types *.local *.log +/.vscode \ No newline at end of file diff --git a/package.json b/package.json index a1a7861..c5785db 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "govuk-frontend": "^5.7.1", "jspdf": "^2.5.2", "lit": "^3.0.1", - "ol": "^9.1.0", + "ol": "^9.2.4", "ol-ext": "^4.0.21", "ol-mapbox-style": "^12.3.5", "postcode": "^5.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fd9834b..82b4c2a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,14 +27,14 @@ dependencies: specifier: ^3.0.1 version: 3.0.1 ol: - specifier: ^9.1.0 - version: 9.1.0 + specifier: ^9.2.4 + version: 9.2.4 ol-ext: specifier: ^4.0.21 - version: 4.0.21(ol@9.1.0) + version: 4.0.21(ol@9.2.4) ol-mapbox-style: specifier: ^12.3.5 - version: 12.3.5(ol@9.1.0) + version: 12.3.5(ol@9.2.4) postcode: specifier: ^5.1.0 version: 5.1.0 @@ -225,7 +225,7 @@ packages: '@babel/core': 7.24.7 '@babel/helper-compilation-targets': 7.24.7 '@babel/helper-plugin-utils': 7.24.7 - debug: 4.3.5 + debug: 4.3.7 lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -5716,26 +5716,26 @@ packages: resolution: {integrity: sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg==} dev: true - /ol-ext@4.0.21(ol@9.1.0): + /ol-ext@4.0.21(ol@9.2.4): resolution: {integrity: sha512-xP4oVD5KBvJW6P9UQwmPcgqMDh6nzUrHjle4qhNqzRW7OkP02mObw5UMGAgz+uhIW8doJ3hYCwy2HcpU1JFpig==} peerDependencies: ol: '>= 5.3.0' dependencies: - ol: 9.1.0 + ol: 9.2.4 dev: false - /ol-mapbox-style@12.3.5(ol@9.1.0): + /ol-mapbox-style@12.3.5(ol@9.2.4): resolution: {integrity: sha512-1tdq+jpzJ7BuqCeRpNV5u90X369MXDbHKpPPt0BNpbzi+4UEJ2dJIrd3eFQV9VbqvZeEIioEjyK7qOqXsUZs8w==} peerDependencies: ol: '*' dependencies: '@mapbox/mapbox-gl-style-spec': 13.28.0 mapbox-to-css-font: 2.4.4 - ol: 9.1.0 + ol: 9.2.4 dev: false - /ol@9.1.0: - resolution: {integrity: sha512-nDrkJ2tzZNpo/wzN/PpHV5zdxbnXZaFktoMaD2cFLEc6gCwlgLY21Yd8wnt/4FjaVYwLBnbN9USXSwIBGcyksQ==} + /ol@9.2.4: + resolution: {integrity: sha512-bsbu4ObaAlbELMIZWnYEvX4Z9jO+OyCBshtODhDKmqYTPEfnKOX3RieCr97tpJkqWTZvyV4tS9UQDvHoCdxS+A==} dependencies: color-rgba: 3.0.0 color-space: 2.0.1 @@ -6880,7 +6880,7 @@ packages: resolution: {integrity: sha512-v67WcEouB5GxbTWL/4NeToqcZiAWEq90N888fczVArY8A79J0L4FD7vj5hm3eUMua5EpoQ59wa/oovY6TLvRUA==} engines: {node: '>= 18'} dependencies: - debug: 4.3.5 + debug: 4.3.7 destroy: 1.2.0 encodeurl: 2.0.0 escape-html: 1.0.3 @@ -7156,7 +7156,7 @@ packages: /spdy-transport@3.0.0: resolution: {integrity: sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==} dependencies: - debug: 4.3.5 + debug: 4.3.7 detect-node: 2.1.0 hpack.js: 2.1.6 obuf: 1.1.2 diff --git a/src/components/my-map/index.ts b/src/components/my-map/index.ts index 1ac3092..be82ffc 100644 --- a/src/components/my-map/index.ts +++ b/src/components/my-map/index.ts @@ -5,7 +5,7 @@ import { defaults as defaultControls, ScaleLine } from "ol/control"; import { FeatureLike } from "ol/Feature"; import { GeoJSON } from "ol/format"; import { GeoJSONFeature } from "ol/format/GeoJSON"; -import { Point } from "ol/geom"; +import { Geometry, Point } from "ol/geom"; import { Feature } from "ol/index"; import { defaults as defaultInteractions } from "ol/interaction"; import { Vector as VectorLayer } from "ol/layer"; @@ -59,6 +59,7 @@ import { hexToRgba, makeGeoJSON, } from "./utils"; +import RenderFeature from "ol/render/Feature"; type MarkerImageEnum = "circle" | "pin"; type ResetControlImageEnum = "unicode" | "trash"; @@ -291,9 +292,9 @@ export class MyMap extends LitElement { const isUsingOS = Boolean(this.osApiKey || this.osProxyEndpoint); const basemapLayers: BaseLayer[] = []; - let osVectorTileBasemap: VectorTileLayer | undefined, + let osVectorTileBasemap: VectorTileLayer | undefined, osRasterBasemap: TileLayer | undefined, - mapboxSatelliteBasemap: VectorLayer | undefined; + mapboxSatelliteBasemap: VectorLayer> | undefined; if (this.basemap === "OSVectorTile" && isUsingOS) { osVectorTileBasemap = makeOsVectorTileBasemap( diff --git a/src/components/my-map/layers.ts b/src/components/my-map/layers.ts index fe50fd5..3bbcbcb 100644 --- a/src/components/my-map/layers.ts +++ b/src/components/my-map/layers.ts @@ -8,6 +8,9 @@ import VectorTileSource from "ol/source/VectorTile"; import { getServiceURL } from "../../lib/ordnanceSurvey"; import VectorLayer from "ol/layer/Vector"; import VectorSource from "ol/source/Vector"; +import { Feature } from "ol"; +import { Geometry } from "ol/geom"; +import RenderFeature from "ol/render/Feature"; export type BasemapEnum = | "OSM" @@ -26,7 +29,7 @@ export function makeDefaultTileLayer(): TileLayer { return layer; } -export function makeMapboxSatelliteBasemap(): VectorLayer { +export function makeMapboxSatelliteBasemap(): VectorLayer> { // Layer is empty besides attribution, style is "applied" after instantiating map in index.ts const layer = new VectorLayer({ source: new VectorSource({ @@ -64,7 +67,7 @@ export function makeOsVectorTileBasemap( apiKey: string, proxyEndpoint: string, copyright: string, -): VectorTileLayer { +): VectorTileLayer { const vectorTileServiceUrl = getServiceURL({ service: "vectorTile", apiKey, diff --git a/src/components/my-map/snapping.ts b/src/components/my-map/snapping.ts index 827e6d6..e2d5a5f 100644 --- a/src/components/my-map/snapping.ts +++ b/src/components/my-map/snapping.ts @@ -1,13 +1,15 @@ import { Feature } from "ol"; +import { Geometry } from "ol/geom"; import Point from "ol/geom/Point"; import { Vector as VectorLayer } from "ol/layer"; import VectorTileLayer from "ol/layer/VectorTile"; +import RenderFeature from "ol/render/Feature"; import VectorSource from "ol/source/Vector"; import { Fill, Style } from "ol/style"; import CircleStyle from "ol/style/Circle"; import { splitEvery } from "rambda"; -export const pointsSource = new VectorSource({ +export const pointsSource = new VectorSource>({ features: [], wrapX: false, }); @@ -34,7 +36,7 @@ export const pointsLayer = new VectorLayer({ * @returns - a VectorSource populated with points within the extent */ export function getSnapPointsFromVectorTiles( - basemap: VectorTileLayer, + basemap: VectorTileLayer, extent: number[], ) { const points =