Skip to content

add function to add trees manually to the current selection #65

@mmaelicke

Description

@mmaelicke

The selection context handles the adding. If no selection is active, a new one needs to be created.

This is more complicated than it sounds:

  1. if there is no selection, create a new one in the offline context and save to device, then update the internal list of selections.
  2. Then, load either the active Selection (if any), or the newly created selection.
  3. Push the new treeId to the selection.
  4. create a object of type ActiveSelection, which includes the mutated selection in block scope and adds a .geoJSON feature to it. For this, all inventory features are loaded and filtered for the treeIds currently in the block-scoped selection.
  5. Calculate a new bounding box for the selection.
  6. set the block-scoped ActiveSelection as a context state and pass down to all components in the application, which use this object.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions