Skip to content

map.queryRenderedFeatures(...) returns clipped features #13588

@tibotiber

Description

@tibotiber

mapbox-gl-js version

v3.16.0

Browser and version

Arc 1.121.0 (70772) - Chromium Engine Version 142.0.7444.162

Expected behavior

map.queryRenderedFeatures(...) should not return clipped features since they're not rendered.

Actual behavior

It returns them.

Link to the demonstration

https://codepen.io/tibotiber/pen/zxqErex?editors=0111

Steps to trigger the unexpected behavior

Check out the codepen, zoom to see the building, click it and see the logs.
Now zoom out so the building disappears due to the clipping layer. click where the building should be and it still shows up in the logs.

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions