Skip to content

Commit

Permalink
maps_react: replace removed inside with booleanPointInPolygon
Browse files Browse the repository at this point in the history
  • Loading branch information
goapunk committed Nov 27, 2024
1 parent 31c54e9 commit 9e90d60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions adhocracy4/maps_react/static/a4maps_react/AddMarkerControl.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand All @@ -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
}
})
Expand Down
3 changes: 3 additions & 0 deletions changelog/_1112.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Fixed

- replace removed turf `inside` function with `booleanPointinPolygon`

0 comments on commit 9e90d60

Please sign in to comment.