001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.gui.layer.markerlayer;
003
004import java.io.File;
005import java.util.Collection;
006
007import org.openstreetmap.josm.data.gpx.WayPoint;
008
009/**
010 * This interface has to be implemented by anyone who wants to create markers.
011 *
012 * When reading a gpx file, all implementations of MarkerMaker registered with
013 * the Marker are consecutively called until one returns a Marker object.
014 *
015 * @author Frederik Ramm
016 */
017public interface MarkerProducers {
018    /**
019     * Returns a collection of Marker objects if this implementation wants to create one for the
020     * given input data, or <code>null</code> otherwise.
021     *
022     * @param wp waypoint data
023     * @param relativePath An path to use for constructing relative URLs or
024     *        <code>null</code> for no relative URLs
025     * @return A collection of Marker objects, or <code>null</code>.
026     */
027    Collection<Marker> createMarkers(WayPoint wp, File relativePath, MarkerLayer parentLayer, double time, double offset);
028}