com.vaadin.flow.component.map.configuration.geometry.
Class Point
All Implemented Interfaces:
Geometry that is represented by a single point and coordinate.
See Also:
-
Field Summary
Fields inherited from class com.vaadin.flow.component.map.configuration.AbstractConfigurationObject
propertyChangeSupport
-
Constructor Summary
ConstructorsConstructorDescriptionPoint
(Coordinate coordinates) Creates a new point geometry located at the specified coordinates.
-
Method Summary
Modifier and TypeMethodDescriptionThe coordinates where the point is located
getType()
The unique type name of this class.
void
setCoordinates
(Coordinate coordinates) Sets the coordinates that locate the point.
void
translate
(double deltaX, double deltaY) Translate the geometry by the specified delta
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
-
Point
Creates a new point geometry located at the specified coordinates. Coordinates must be specified in the map's user projection, which by default is
EPSG:4326
, also referred to as GPS coordinates.Parameters:
coordinates
- the coordinates that locate the point
-
-
Method Details
-
getType
Description copied from class:
AbstractConfigurationObject
The unique type name of this class. Used by the client-side synchronization mechanism to determine which OpenLayers class to synchronize into.
Specified by:
getType
in classAbstractConfigurationObject
-
getCoordinates
The coordinates where the point is located
Returns:
the current coordinates
-
setCoordinates
Sets the coordinates that locate the point. 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, not null -
translate
public void translate(double deltaX, double deltaY) Description copied from class:
SimpleGeometry
Translate the geometry by the specified delta
Specified by:
translate
in classSimpleGeometry
Parameters:
deltaX
- amount to move on x-axisdeltaY
- amount to move on y-axis
-