I’m encountering an issue where querySourceFeatures
is not returning all the features that should be present within the viewport.
Details:
- Vector Source: In my vector, there are a total of 1,524,444 features.
- When using
querySourceFeatures
, I’m only able to retrieve 186,317 features, which is significantly less than expected. - I’ve also tried using
queryRenderedFeatures
, but I am seeing the same result.
Code Snippet:
map.querySourceFeatures('households', {
sourceLayer: 'households'
});
Steps Taken:
- I have confirmed that the data source contains the expected number of features.
- The issue persists with
queryRenderedFeatures
as well, which makes me believe it’s related to how features are being queried or rendered.
Expected Behavior:
I expect to be able to query all 1,524,444 features within the viewport using querySourceFeatures
or queryRenderedFeatures
.
Environment:
- Mapbox version: v3.6.0
- Browser: Chrome 129.0.6668.58
- OS: macOS 15
Could anyone please help identify how to retrieve all the features using querySourceFeatures
or guide me on what could be causing this limitation? Thanks!