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