Class SimpleMapMarkerCircle

  • All Implemented Interfaces:
    adams.core.MetaDataSupporter, HitIndicator, MetaDataSupporter, TimestampSupporter, org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate, org.openstreetmap.gui.jmapviewer.interfaces.MapMarker, org.openstreetmap.gui.jmapviewer.interfaces.MapObject
    Direct Known Subclasses:
    SimpleMapMarkerDot

    public class SimpleMapMarkerCircle
    extends AbstractMapObject
    implements org.openstreetmap.gui.jmapviewer.interfaces.MapMarker, HitIndicator
    A simple implementation of the MapMarker interface. Each map marker is painted as a circle with a black border line and filled with a specified color.
    Author:
    Jan Peter Stotz (original code: MapMarkerCircle), FracPete (fracpete at waikato dot ac dot nz)
    • Field Detail

      • coord

        protected org.openstreetmap.gui.jmapviewer.Coordinate coord
      • radius

        protected double radius
      • markerStyle

        protected org.openstreetmap.gui.jmapviewer.interfaces.MapMarker.STYLE markerStyle
      • radiusPixels

        protected int radiusPixels
        the current radius in pixels.
    • Constructor Detail

      • SimpleMapMarkerCircle

        public SimpleMapMarkerCircle​(org.openstreetmap.gui.jmapviewer.Coordinate coord,
                                     double radius)
      • SimpleMapMarkerCircle

        public SimpleMapMarkerCircle​(String name,
                                     org.openstreetmap.gui.jmapviewer.Coordinate coord,
                                     double radius)
      • SimpleMapMarkerCircle

        public SimpleMapMarkerCircle​(org.openstreetmap.gui.jmapviewer.Layer layer,
                                     org.openstreetmap.gui.jmapviewer.Coordinate coord,
                                     double radius)
      • SimpleMapMarkerCircle

        public SimpleMapMarkerCircle​(double lat,
                                     double lon,
                                     double radius)
      • SimpleMapMarkerCircle

        public SimpleMapMarkerCircle​(org.openstreetmap.gui.jmapviewer.Layer layer,
                                     double lat,
                                     double lon,
                                     double radius)
      • SimpleMapMarkerCircle

        public SimpleMapMarkerCircle​(org.openstreetmap.gui.jmapviewer.Layer layer,
                                     String name,
                                     org.openstreetmap.gui.jmapviewer.Coordinate coord,
                                     double radius)
      • SimpleMapMarkerCircle

        public SimpleMapMarkerCircle​(org.openstreetmap.gui.jmapviewer.Layer layer,
                                     String name,
                                     org.openstreetmap.gui.jmapviewer.Coordinate coord,
                                     double radius,
                                     org.openstreetmap.gui.jmapviewer.interfaces.MapMarker.STYLE markerStyle,
                                     org.openstreetmap.gui.jmapviewer.Style style)
    • Method Detail

      • getCoordinate

        public org.openstreetmap.gui.jmapviewer.Coordinate getCoordinate()
        Specified by:
        getCoordinate in interface org.openstreetmap.gui.jmapviewer.interfaces.MapMarker
      • getLat

        public double getLat()
        Specified by:
        getLat in interface org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate
        Specified by:
        getLat in interface org.openstreetmap.gui.jmapviewer.interfaces.MapMarker
      • getLon

        public double getLon()
        Specified by:
        getLon in interface org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate
        Specified by:
        getLon in interface org.openstreetmap.gui.jmapviewer.interfaces.MapMarker
      • setRadius

        public void setRadius​(double value)
      • getRadius

        public double getRadius()
        Specified by:
        getRadius in interface org.openstreetmap.gui.jmapviewer.interfaces.MapMarker
      • getMarkerStyle

        public org.openstreetmap.gui.jmapviewer.interfaces.MapMarker.STYLE getMarkerStyle()
        Specified by:
        getMarkerStyle in interface org.openstreetmap.gui.jmapviewer.interfaces.MapMarker
      • paint

        public void paint​(Graphics g,
                          Point position,
                          int radio)
        Specified by:
        paint in interface org.openstreetmap.gui.jmapviewer.interfaces.MapMarker
      • getDefaultStyle

        public static org.openstreetmap.gui.jmapviewer.Style getDefaultStyle()
      • setLat

        public void setLat​(double lat)
        Specified by:
        setLat in interface org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate
      • setLon

        public void setLon​(double lon)
        Specified by:
        setLon in interface org.openstreetmap.gui.jmapviewer.interfaces.ICoordinate
      • isHit

        public boolean isHit​(org.openstreetmap.gui.jmapviewer.JMapViewer viewer,
                             org.openstreetmap.gui.jmapviewer.Coordinate coord)
        Checks whether the given coordinate is a hit for a specific mapobject.
        Specified by:
        isHit in interface HitIndicator
        Parameters:
        viewer - the underlying viewer that triggered the call
        coord - the coordinate to check
        Returns:
        true if the mapobject is "hit" by this coordinate