-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grid renderer for interactivity #147
Comments
We should use an rtree instead. See #35. |
I'm curious, what would be the advantage of using an rtree? It seems like it would be way more complex. The rtree will narrow down the features by bounding box, but you'll need to iterate over all of them to find if they actually intersect. The intersection calculations would have to consider styles (sizes, widths, offsets, etc). Since the bounding box may change with zoom level, you need to consider that too. On top of that, you'd need to keep the original geometries. By reusing the renderer we get all of this automatically, and performance seems good. |
The idea would be to transfer one pixel on each mousemove. While its a bit scary that readPixels is synchronous, it is (for me at least) < 1ms if you're only reading 1 pixel. Its < 10 ms if continuously repainting. Tom had a negative reaction to the grid approach too, which probably means I'm missing something here |
Common Interface for sub controls and one store - fixes mapbox#148, fixes mapbox#149, fixes mapbox#137, fixes mapbox#133, fixes mapbox#104, fixes mapbox#94, fixes mapbox#89, fixes mapbox#144
Rasterize features to a grid of ids that can be used to enable interaction.
We need to pass an id attribute to the shader.
Shader attributes can't be optional. Either we:
The first option means more shaders to maintain. The second option is potentially slower, but I need to measure this. We could also generate shaders (this might be necessary for bluesky #146).
performance:
Initial attempt in
gl-interaction
The text was updated successfully, but these errors were encountered: