com.vaadin.flow.component.map.configuration.feature.
Class PointBasedFeature
- java.lang.Object
-
- com.vaadin.flow.component.map.configuration.AbstractConfigurationObject
-
- com.vaadin.flow.component.map.configuration.Feature
-
- com.vaadin.flow.component.map.configuration.feature.PointBasedFeature
-
-
Field Summary
-
Fields inherited from class com.vaadin.flow.component.map.configuration.AbstractConfigurationObject
propertyChangeSupport
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PointBasedFeature()
protected
PointBasedFeature(Coordinate coordinates)
-
Method Summary
All Methods Modifier and Type Method Description Coordinate
getCoordinates()
The coordinates that define where the feature is located on the map.
Point
getGeometry()
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, getType, setStyle
-
Methods inherited from class com.vaadin.flow.component.map.configuration.AbstractConfigurationObject
addChild, addPropertyChangeListener, collectChanges, deepMarkAsDirty, getId, markAsDirty, notifyChange, notifyChange, removeChild, removePropertyChangeListener, setId, update
-
-
-
-
Constructor Detail
-
PointBasedFeature
protected PointBasedFeature()
-
PointBasedFeature
protected PointBasedFeature(Coordinate coordinates)
-
-
Method Detail
-
getCoordinates
public Coordinate getCoordinates()
The coordinates that define where the feature is located on the map. The coordinates must be in the same projection as the
View.getProjection()
andSource.getProjection()
.Returns:
the current coordinates
-
setCoordinates
public void setCoordinates(Coordinate coordinates)
Sets the coordinates that define where the feature is located on the map. The coordinates must be in the same projection as the
View.getProjection()
andSource.getProjection()
.Parameters:
coordinates
- the new coordinates
-
getGeometry
public Point getGeometry()
The
Point
geometry representing this feature.Overrides:
getGeometry
in classFeature
Returns:
the current point geometry
-
setGeometry
public void setGeometry(SimpleGeometry geometry)
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
-
-