Class PointBasedFeature

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    MarkerFeature

    public abstract class PointBasedFeature
    extends Feature
    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:
    Serialized Form
    • 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. 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 using Map.setUserProjection(String), then coordinates must be specified in that projection instead.
        Returns:
        the current coordinates
      • setCoordinates

        public void setCoordinates​(Coordinate coordinates)
        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 using Map.setUserProjection(String), then coordinates must be specified in that projection instead.
        Parameters:
        coordinates - the new coordinates
      • getGeometry

        public Point getGeometry()
        The Point geometry representing this feature.
        Overrides:
        getGeometry in class Feature
        Returns:
        the current point geometry