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 public static enum STYLE {FIXED, VARIABLE} 020 021 /** 022 * @return Latitude and Longitude of the map marker position 023 */ 024 public Coordinate getCoordinate(); 025 /** 026 * @return Latitude of the map marker position 027 */ 028 public double getLat(); 029 030 /** 031 * @return Longitude of the map marker position 032 */ 033 public double getLon(); 034 035 /** 036 * @return Radius of the map marker position 037 */ 038 public double getRadius(); 039 040 /** 041 * @return Style of the map marker 042 */ 043 public STYLE getMarkerStyle(); 044 045 /** 046 * Paints the map marker on the map. The <code>position</code> specifies the 047 * coordinates within <code>g</code> 048 * 049 * @param g 050 * @param position 051 * @param radio 052 */ 053 public void paint(Graphics g, Point position, int radio); 054}