Skip to content

Query rendered features accuracy decreases when terrain is present #13604

@joshnice

Description

@joshnice

mapbox-gl-js version

3.17.0

Browser and version

Chrome 142.0.7444.176

Expected behavior

The queryRenderedFeatures function should return the features that the cursor is over.

Actual behavior

The queryRenderedFeatures function doesn't always return the features that the cursor is over.

Link to the demonstration

https://jsbin.com/cayofanaca/edit?html,output

Steps to trigger the unexpected behavior

I understand that this is not always the case and sometimes queryRenderedFeatures does work correctly when terrain is enabled. Quite possible it might be due to the camera angles and zoom level I am using, when there is no bearing it seems to work better.

There is a video below of the issue I am having in the example I linked above.

Screen.Recording.2025-12-09.at.11.56.44.mp4

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