Package io.jmix.mapsui.component
Interface CanvasLayer.Polyline
- All Superinterfaces:
CanvasLayer.Geometry
- Enclosing interface:
- CanvasLayer
A wrapper class encapsulating
LineString
on the canvas.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
An event that is fired after click on the polyline.static class
An event that is fired after modifying the polyline via UI.static class
An event that is fired after right click on the polyline. -
Method Summary
Modifier and TypeMethodDescriptionRegisters a new polyline click listener.Registers a new polyline modified listener.Registers a new polyline right click listener.org.locationtech.jts.geom.LineString
Returns a JTS linestring.setEditable
(boolean editable) Sets whether the geometry is to be modifiable on a canvas.setPopupContent
(String popupContent) Adds a popup window to be opened as user clicks on the polyline.setPopupOptions
(PopupWindowOptions options) Specifies options for a popup window added bysetPopupContent(String)
.setStyle
(PolylineStyle style) Applies a style to the polyline.setTooltipContent
(String tooltipContent) Adds a tooltip to be opened as user hovers on the polyline.setTooltipOptions
(TooltipOptions options) Specifies options for a tooltip added bysetTooltipContent(String)
.Methods inherited from interface io.jmix.mapsui.component.CanvasLayer.Geometry
closePopup, closeTooltip, isEditable, openPopup, openTooltip
-
Method Details
-
getGeometry
org.locationtech.jts.geom.LineString getGeometry()Returns a JTS linestring.- Specified by:
getGeometry
in interfaceCanvasLayer.Geometry
-
setStyle
Applies a style to the polyline.- Parameters:
style
- polyline style- Returns:
- current polyline. Useful for a fluent API.
-
setPopupContent
Adds a popup window to be opened as user clicks on the polyline.- Parameters:
popupContent
- content of the popup window- Returns:
- current polyline. Useful for a fluent API.
-
setPopupOptions
Specifies options for a popup window added bysetPopupContent(String)
.- Parameters:
options
- popup window options- Returns:
- current polyline. Useful for a fluent API.
-
setTooltipContent
Adds a tooltip to be opened as user hovers on the polyline.- Parameters:
tooltipContent
- content of the tooltip box- Returns:
- current polyline. Useful for a fluent API.
-
setTooltipOptions
Specifies options for a tooltip added bysetTooltipContent(String)
.- Parameters:
options
- tooltip options- Returns:
- current polyline. Useful for a fluent API.
-
setEditable
Description copied from interface:CanvasLayer.Geometry
Sets whether the geometry is to be modifiable on a canvas.- Specified by:
setEditable
in interfaceCanvasLayer.Geometry
-
addClickListener
Registers a new polyline click listener.- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
addRightClickListener
Registers a new polyline right click listener.- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
addModifiedListener
Registers a new polyline modified listener.- Parameters:
listener
- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-