LuciadCPillar 2024.0.08
|
This class allows you to interactively edit Features on the Map. More...
#include <luciad/edit/Editor.h>
Classes | |
class | Builder |
Builder for the Editor class. More... | |
Public Member Functions | |
~Editor () | |
std::shared_ptr< FeatureLayer > | getEditHandleLayer () const |
Returns the layer that paint IEditHandle s. More... | |
EventResult | onEvent (const std::shared_ptr< IInputEvent > &inputEvent) |
Handles the given event, and returns if the event was handled or not. More... | |
Static Public Member Functions | |
static Builder | newBuilder () |
Returns a new builder for creating an Editor . More... | |
This class allows you to interactively edit Features on the Map.
See the related guide for an overview of the editing API.
It manages the editing state and provides visualization capabilities by:
IFeatureEditCandidateProvider
)IFeatureModel
instances with handles, and keeping them up-to-dateLayerList
that can be used to visualize the handle modelsEditing can be configured using:
Editor::Builder
FeatureLayer::Builder::editConfiguration
FeatureLayer::Builder::editCreateGeometryProvider
It is allowed to access this class on the UI thread only. See the related article: Threading rules for the Map
luciad::Editor::~Editor | ( | ) |
std::shared_ptr< FeatureLayer > luciad::Editor::getEditHandleLayer | ( | ) | const |
Returns the layer that paint IEditHandle
s.
This layer can contain the edit handles of multiple feature layers. The returned layer instance will always be the same, but the layer's model gets updated as edit handles are added, removed or modified.
A controller implementation typically adds this layer to its layer list
, although it can also add this layer to the Map's layer list
.
IEditHandle
s.
|
static |
EventResult luciad::Editor::onEvent | ( | const std::shared_ptr< IInputEvent > & | inputEvent | ) |
Handles the given event, and returns if the event was handled or not.
This method delegates the given event to one of the currently available handles. The order in which this event is passed to the handles is determined by the handle's state, and the order in which they are returned from IEditHandles
:
IEditHandles
is usedinputEvent | an event, cannot be nullptr . |
NullArgumentException | when nullptr is passed. |