Skip to content

Draft: Selection demo - #412

Closed
isaacbrodsky wants to merge 3 commits into
developmentseed:mainfrom
fusedio:selection-demo
Closed

isaacbrodsky wants to merge 3 commits into
developmentseed:mainfrom
fusedio:selection-demo

Conversation

@isaacbrodsky

@isaacbrodsky isaacbrodsky commented Mar 8, 2024 •

Copy link
Copy Markdown
Contributor

What I am changing

  • Adds a prototype of drawing a selection box on top of the DeckGL map. The selected coordinates are printed out.
  • This is not a complete implementation because the box will not move when the map moves, which looks very strange. I also did not implement any of the selection-mode switching code.
  • Draft per discussion with @kylebarron off Github.

How I did it

  • See index.tsx. An HTML element is drawn on top of the map using relative screen coordinates. This element can be styled as with any element, so border, background, etc can all be customized. You can listen for some combination of layout events or Deck viewport events to redraw the element. You may need to add a DeckGL ref object in order to re-unproject the coordinates.

How you can test it

-Run the "North America Roads" example until the map is rendered

Screenshot 2024-03-08 at 11 31 14 AM

Related Issues

vgeorge added a commit that referenced this pull request Jul 29, 2024
Building on top of #412
with help from @batpad

### Change list

- Draw bbox in deck instead of separate layer

### Notes

- Create mode for when picking bbox should be active
- Send data back to Python
- Make multiple draw calls, one per set of layer ids, then set on layer
state
- Maybe delegate to sub models directly. Add a `pick` callback directly
onto the models, and then iterate over each model, calling `pick` which
picks and then assigns directly onto that model's state?
- Note about crossing international dateline
- Ensure we're not creating more than 256 layers.

---------

Co-authored-by: Isaac Brodsky <[email protected]>
Co-authored-by: Sanjay Bhangar <[email protected]>
Co-authored-by: Vitor George <[email protected]>
roger120981 pushed a commit to roger120981/lonboard that referenced this pull request Jul 14, 2025
Building on top of developmentseed#412
with help from @batpad

### Change list

- Draw bbox in deck instead of separate layer

### Notes

- Create mode for when picking bbox should be active
- Send data back to Python
- Make multiple draw calls, one per set of layer ids, then set on layer
state
- Maybe delegate to sub models directly. Add a `pick` callback directly
onto the models, and then iterate over each model, calling `pick` which
picks and then assigns directly onto that model's state?
- Note about crossing international dateline
- Ensure we're not creating more than 256 layers.

---------

Co-authored-by: Isaac Brodsky <[email protected]>
Co-authored-by: Sanjay Bhangar <[email protected]>
Co-authored-by: Vitor George <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant