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`