openlayers / openlayers/openlayers

webgl layer.getFeatures Unimplemented

Open
#17,288 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
JavaScript
Stars
12.6k
Forks
3.2k
Avg merge
2d 17h
Merged PRs (30d)
21

Description

I’m using map.forEachFeatureAtPixel inside a throttled pointermove event handler to retrieve features at a pixel.

Even with throttling, I still see [Violation] 'setTimeout' handler took ms warnings, and there is noticeable lag when dragging or panning the map.

I attempted to use layer.getFeatures() instead, but it’s not implemented in this context.

Are there recommended alternatives to forEachFeatureAtPixel for better performance?

I'm using OL 10.7 and Chrome 143

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names map.forEachFeatureAtPixel and layer.getFeatures(), but no source file or test. Start by tracing those APIs in the OpenLayers source and reproducing the throttled pointermove case with OL 10.7 in Chrome 143. Done is undefined until a specific performance fix or getFeatures implementation is agreed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, performance, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.