001// License: GPL. For details, see Readme.txt file.
002package org.openstreetmap.gui.jmapviewer.interfaces;
003
004import java.awt.Graphics;
005import java.awt.Point;
006
007import org.openstreetmap.gui.jmapviewer.Coordinate;
008import org.openstreetmap.gui.jmapviewer.JMapViewer;
009
010/**
011 * Interface to be implemented by all one dimensional elements that can be displayed on the map.
012 *
013 * @author Jan Peter Stotz
014 * @see JMapViewer#addMapMarker(MapMarker)
015 * @see JMapViewer#getMapMarkerList()
016 */
017public interface MapMarker extends MapObject, ICoordinate {
018
019    enum STYLE {
020        FIXED,
021        VARIABLE
022    }
023
024    /**
025     * @return Latitude and Longitude of the map marker position
026     */
027    Coordinate getCoordinate();
028
029    /**
030     * @return Latitude of the map marker position
031     */
032    @Override
033    double getLat();
034
035    /**
036     * @return Longitude of the map marker position
037     */
038    @Override
039    double getLon();
040
041    /**
042     * @return Radius of the map marker position
043     */
044    double getRadius();
045
046    /**
047     * @return Style of the map marker
048     */
049    STYLE getMarkerStyle();
050
051    /**
052     * Paints the map marker on the map. The <code>position</code> specifies the
053     * coordinates within <code>g</code>
054     *
055     * @param g graphics
056     * @param position coordinates
057     * @param radius radius
058     */
059    void paint(Graphics g, Point position, int radius);
060}