001    package org.openstreetmap.gui.jmapviewer.interfaces;
002    
003    //License: GPL. Copyright 2008 by Jan Peter Stotz
004    
005    import java.awt.Graphics;
006    import java.awt.Point;
007    
008    import 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     */
017    public interface MapMarker {
018    
019        /**
020         * @return Latitude of the map marker position
021         */
022        public double getLat();
023    
024        /**
025         * @return Longitude of the map marker position
026         */
027        public double getLon();
028    
029        /**
030         * Paints the map marker on the map. The <code>position</code> specifies the
031         * coordinates within <code>g</code>
032         *
033         * @param g
034         * @param position
035         */
036        public void paint(Graphics g, Point position);
037    }