Skip to content

[FIX] geoengine_tools: don't select measurement features#7

Merged
leNeo merged 1 commit into
19.0-mig-base_geoenginefrom
19.0-fix-measure-select
Jun 29, 2026
Merged

[FIX] geoengine_tools: don't select measurement features#7
leNeo merged 1 commit into
19.0-mig-base_geoenginefrom
19.0-fix-measure-select

Conversation

@leNeo

@leNeo leNeo commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Bug

Clicking a drawn measurement geometry (ruler, area, or proximity line) crashed:

TypeError: undefined is not an object (evaluating 'attributes.id')
  mountGeoengineRecord → updateInfoBox → select interaction

Measurement features live on a dedicated layer and carry no record, so they have no attributes. The base ol.interaction.Select (created without a layer filter) selected them, and updateInfoBox/mountGeoengineRecord then dereferenced the missing attributes.

Fix (geoengine_measure_tools.esm.js)

  • registerInteraction(): exclude the measurement layer from both select interactions via a layers filter (also removes the cosmetic “feature disappears on select” glitch).
  • updateInfoBox(): safety net — ignore features without attributes so they never reach mountGeoengineRecord.

Verified: pre-commit prettier + eslint pass on the file.

🤖 Generated with Claude Code

Clicking a drawn ruler / area / proximity geometry crashed with
"undefined is not an object (evaluating 'attributes.id')": measurement
features live on a dedicated layer but carry no record, so the base
select interaction selected them and updateInfoBox/mountGeoengineRecord
dereferenced their missing `attributes`.

- registerInteraction(): exclude the measurement layer from both select
  interactions via a `layers` filter.
- updateInfoBox(): safety net — ignore features without `attributes`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@leNeo leNeo merged commit c62f898 into 19.0-mig-base_geoengine Jun 29, 2026
4 checks passed
@leNeo leNeo deleted the 19.0-fix-measure-select branch June 29, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant