Class AbstractTileSourceLayer.PrecacheTask

  • All Implemented Interfaces:
    org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener
    Enclosing class:
    AbstractTileSourceLayer<T extends org.openstreetmap.gui.jmapviewer.tilesources.AbstractTMSTileSource>

    public class AbstractTileSourceLayer.PrecacheTask
    extends Object
    implements org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener
    Task responsible for precaching imagery along the gpx track
    Since:
    8526
    • Constructor Detail

      • PrecacheTask

        public PrecacheTask​(ProgressMonitor progressMonitor,
                            List<LatLon> points,
                            double bufferX,
                            double bufferY)
        Constructs a new PrecacheTask.
        Parameters:
        progressMonitor - that will be notified about progess of the task
        bufferY - buffer Y in degrees around which to download tiles
        bufferX - buffer X in degrees around which to download tiles
        points - list of points along which to download
    • Method Detail

      • isFinished

        public boolean isFinished()
        Determines if the task is finished.
        Returns:
        true, if all is done
      • getTotalCount

        public int getTotalCount()
        Returns total number of tiles to download.
        Returns:
        total number of tiles to download
      • cancel

        public void cancel()
        cancel the task
      • tileLoadingFinished

        public void tileLoadingFinished​(org.openstreetmap.gui.jmapviewer.Tile tile,
                                        boolean success)
        Specified by:
        tileLoadingFinished in interface org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener
      • run

        public void run()
        Execute the download