com.vaadin.flow.component.map.configuration.feature.
Class PointBasedFeature
All Implemented Interfaces:
Direct Known Subclasses:
Abstract base class for features that are represented by a single point and a single coordinate.
Technically this is a Feature
that uses a Point
geometry for
representation.
See Also:
-
Field Summary
Fields inherited from class com.vaadin.flow.component.map.configuration.AbstractConfigurationObject
propertyChangeSupport
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe coordinates that define where the feature is located on the map.
The
Point
geometry representing this feature.void
setCoordinates
(Coordinate coordinates) Sets the coordinates that define where the feature is located on the map.
void
setGeometry
(SimpleGeometry geometry) Sets the geometry representing this feature.
Methods inherited from class com.vaadin.flow.component.map.configuration.Feature
getStyle, getText, getTextStyle, getType, isDraggable, setDraggable, setStyle, setText, setTextStyle
Methods inherited from class com.vaadin.flow.component.map.configuration.AbstractConfigurationObject
addChild, addNullableChild, addPropertyChangeListener, collectChanges, deepMarkAsDirty, getId, markAsDirty, notifyChange, notifyChange, removeChild, removePropertyChangeListener, setId, update
-
Constructor Details
-
PointBasedFeature
protected PointBasedFeature() -
PointBasedFeature
-
-
Method Details
-
getCoordinates
The coordinates that define where the feature is located on the map. Coordinates are returned in the map's user projection, which by default is
EPSG:4326
, also referred to as GPS coordinates. If the user projection has been changed usingMap.setUserProjection(String)
, then coordinates must be specified in that projection instead.Returns:
the current coordinates
-
setCoordinates
Sets the coordinates that define where the feature is located on the map. Coordinates must be specified in the map's user projection, which by default is
EPSG:4326
, also referred to as GPS coordinates. If the user projection has been changed usingMap.setUserProjection(String)
, then coordinates must be specified in that projection instead.Parameters:
coordinates
- the new coordinates -
getGeometry
The
Point
geometry representing this feature.Overrides:
getGeometry
in classFeature
Returns:
the current point geometry
-
setGeometry
Sets the geometry representing this feature. This must be a
Point
geometry.Overrides:
setGeometry
in classFeature
Parameters:
geometry
- the new geometry, not nullThrows:
IllegalArgumentException
- if the geometry is not an instance ofPoint
-