diff --git a/adhocracy4/maps_react/static/a4maps_react/AddMarkerControl.js b/adhocracy4/maps_react/static/a4maps_react/AddMarkerControl.js index 24e0a30e1..919d6459c 100644 --- a/adhocracy4/maps_react/static/a4maps_react/AddMarkerControl.js +++ b/adhocracy4/maps_react/static/a4maps_react/AddMarkerControl.js @@ -1,6 +1,6 @@ import L from 'leaflet' import { createControlComponent } from '@react-leaflet/core' -import { point, inside } from '@turf/turf' +import { point, booleanPointInPolygon } from '@turf/turf' import { makeIcon } from './GeoJsonMarker' export function checkPointInsidePolygon (marker, polygons) { @@ -9,7 +9,7 @@ export function checkPointInsidePolygon (marker, polygons) { polygons.eachLayer((layer) => { const polygonGeoJSON = layer.toGeoJSON() - if (inside(pointGeoJSON, polygonGeoJSON)) { + if (booleanPointInPolygon(pointGeoJSON, polygonGeoJSON)) { isInPolygon = true } }) diff --git a/changelog/_1112.md b/changelog/_1112.md new file mode 100644 index 000000000..e65e1a76e --- /dev/null +++ b/changelog/_1112.md @@ -0,0 +1,3 @@ +### Fixed + +- replace removed turf `inside` function with `booleanPointinPolygon` diff --git a/package.json b/package.json index de07a932f..7b4b541a3 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ ], "dependencies": { "@popperjs/core": "2.11.8", - "@turf/turf": "^6.5.0", + "@turf/turf": "7.0.0", "file-saver": "2.0.5", "immutability-helper": "3.1.1", "jquery": "3.7.1", @@ -26,7 +26,7 @@ "react": "18.3.1", "react-dom": "18.3.1", "react-flip-move": "3.0.5", - "react-leaflet": "^4.2.1", + "react-leaflet": "4.2.1", "react-markdown": "9.0.1", "react-slick": "0.30.2", "shpjs": "6.1.0" @@ -37,7 +37,7 @@ "@babel/preset-env": "7.26.0", "@babel/preset-react": "7.25.9", "@maplibre/maplibre-gl-leaflet": "0.0.22", - "@react-leaflet/core": "^2.1.0", + "@react-leaflet/core": "2.1.0", "@testing-library/jest-dom": "6.6.3", "@testing-library/react": "16.0.1", "eslint": "8.57.1",