You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I call queryRenderedFeatures(), I assume the results come from a fully loaded map, with zoom/center defined as the map's state at the time I invoked it. Currently, I can achieve this with:
map.on('render', function() {
if (map.loaded()){
map.queryRenderedFeatures(...);
map.off('render');
}
})
I think it's a fair assumption that no one wants to run .qRT on a partially loaded map, so it would be nice for the method to check for map.loaded() internally before doing the query. Either by default, or via some parameter like map.queryRenderedFeatures({onDataend:true});
The text was updated successfully, but these errors were encountered:
We had multiple design discussions regarding whether .qRT should be synchronous or asynchronous, and the conclusion was that a sync API was preferable. I don't think we want to re-litigate that, and I don't think it would be good API design to make it synchronous by default but asynchronous if you pass a specific option. Please continue to use the on('render') pattern where needed.
Offshoot of #2471 discussion:
When I call
queryRenderedFeatures()
, I assume the results come from a fully loaded map, with zoom/center defined as the map's state at the time I invoked it. Currently, I can achieve this with:I think it's a fair assumption that no one wants to run
.qRT
on a partially loaded map, so it would be nice for the method to check formap.loaded()
internally before doing the query. Either by default, or via some parameter likemap.queryRenderedFeatures({onDataend:true});
The text was updated successfully, but these errors were encountered: