Class GeometryEditorTool
- Direct Known Subclasses:
FreehandTool
,ShapeTool
,VertexTool
GeometryEditor
.
Different types of GeometryEditorTool provide different ways of interacting with the view to create and edit geometries
with a GeometryEditor
. They control how an interaction (for example a tap or a drag gesture on the map view)
uses the interaction position to update the GeometryEditor.geometryProperty()
, or to navigate the map view.
VertexTool
, FreehandTool
, and ShapeTool
allow you to customize how the
GeometryEditor
reacts to each user interaction, allowing you to tailor the exact behavior appropriately for
your users and workflow. GeometryEditorTool also determines the appearance of the geometry
by specifying the GeometryEditorStyle
used to draw the geometry in the view.
You may wish to create multiple different tool objects in order to hold different settings, and set them into the
GeometryEditor.toolProperty()
as appropriate for your workflow. For example, you could create multiple
VertexTool
objects with GeometryEditorStyle
values corresponding the different symbols used by
different feature layers.
The different tools do not correspond to different geometry types - for example the VertexTool
can be used
to edit Point
, Multipoint
,
Polyline
and Polygon
geometries.
The type of geometry being edited using the tool is defined by the start method parameter
(see GeometryEditor.start(GeometryType)
and GeometryEditor.start(Geometry)
).
When a GeometryEditorTool is created, a consistent set of default symbology appropriate for that tool type is applied
to the styleProperty()
.
- Since:
- 200.1.0
- See Also:
-
Property Summary
TypePropertyDescriptionDefines the visual appearance ofGeometryEditor
geometries when this tool is in use. -
Method Summary
Modifier and TypeMethodDescriptiongetStyle()
Gets the value of thestyle
property.void
setStyle
(GeometryEditorStyle style) Sets the value of thestyle
property.Defines the visual appearance ofGeometryEditor
geometries when this tool is in use.
-
Property Details
-
style
Defines the visual appearance ofGeometryEditor
geometries when this tool is in use.When a GeometryEditorTool is created, a consistent set of default symbology appropriate for that tool type is applied to its
styleProperty()
property. For example,FreehandTool
andShapeTool
define all vertex symbols as null by default because they use drag gestures to define entire parts of polyline and polygon geometries, whereas theVertexTool
defines non-null vertex symbols because it is important to be able to see and interact with individual vertices when editing geometries with this tool.Attempting to set the value to null will throw a NullPointerException.
- Since:
- 200.1.0
- See Also:
-
-
Method Details
-
styleProperty
Defines the visual appearance ofGeometryEditor
geometries when this tool is in use.When a GeometryEditorTool is created, a consistent set of default symbology appropriate for that tool type is applied to its
styleProperty()
property. For example,FreehandTool
andShapeTool
define all vertex symbols as null by default because they use drag gestures to define entire parts of polyline and polygon geometries, whereas theVertexTool
defines non-null vertex symbols because it is important to be able to see and interact with individual vertices when editing geometries with this tool.Attempting to set the value to null will throw a NullPointerException.
- Returns:
- the
style
property - Since:
- 200.1.0
- See Also:
-
getStyle
Gets the value of thestyle
property.- Property description:
- Defines the visual appearance of
GeometryEditor
geometries when this tool is in use.When a GeometryEditorTool is created, a consistent set of default symbology appropriate for that tool type is applied to its
styleProperty()
property. For example,FreehandTool
andShapeTool
define all vertex symbols as null by default because they use drag gestures to define entire parts of polyline and polygon geometries, whereas theVertexTool
defines non-null vertex symbols because it is important to be able to see and interact with individual vertices when editing geometries with this tool.Attempting to set the value to null will throw a NullPointerException.
- Returns:
- the value of the
style
property - Since:
- 200.1.0
- See Also:
-
setStyle
Sets the value of thestyle
property.- Property description:
- Defines the visual appearance of
GeometryEditor
geometries when this tool is in use.When a GeometryEditorTool is created, a consistent set of default symbology appropriate for that tool type is applied to its
styleProperty()
property. For example,FreehandTool
andShapeTool
define all vertex symbols as null by default because they use drag gestures to define entire parts of polyline and polygon geometries, whereas theVertexTool
defines non-null vertex symbols because it is important to be able to see and interact with individual vertices when editing geometries with this tool.Attempting to set the value to null will throw a NullPointerException.
- Parameters:
style
- the value for thestyle
property- Since:
- 200.1.0
- See Also:
-