webgl layer.getFeatures Unimplemented

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

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
32/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
javascript

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.

Description

feature request

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

Dominant language
JavaScript
Stars
12.6k
Forks
3.2k
Avg merge
2d 7h
Merged PRs (30d)
5

Getting set up

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.

More from openlayers/openlayers

All issues in openlayers/openlayers

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.