Commit ac96fc9
committed
fix: polygon filter for point layers using GeoJSON column mode
When filtering points by drawing a polygon, layers using GeoJSON column
mode failed because:
1. geojsonPosAccessor received data as {index, dataContainer} object
from filter-utils but tried to access it as an array via
d[geojson.fieldIdx], returning undefined
2. Even with correct data access, the accessor returned raw WKT strings
(e.g. 'POINT (7.63 45.04)') instead of [lng, lat] coordinates
Fix by:
- Currying geojsonPosAccessor with dataContainer (matching the pattern
used by pointPosAccessor and geoarrowPosAccessor)
- Using dataContainer.valueAt() to properly access field values
- Parsing WKT POINT strings into [lng, lat, alt] coordinate arrays
- Supporting GeoJSON objects with coordinates property
- Returning [NaN, NaN, 0] for invalid data so the existing
Number.isFinite check in filter-utils gracefully excludes them
Fixes #3278
Signed-off-by: pierreeurope <pierre.europe@pm.me>1 parent 8c5030c commit ac96fc9
1 file changed
Lines changed: 27 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
124 | 135 | | |
125 | 136 | | |
126 | | - | |
127 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
128 | 152 | | |
129 | 153 | | |
130 | 154 | | |
| |||
243 | 267 | | |
244 | 268 | | |
245 | 269 | | |
246 | | - | |
| 270 | + | |
247 | 271 | | |
248 | 272 | | |
249 | 273 | | |
| |||
0 commit comments