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 java.lang.Object
    implements org.openstreetmap.gui.jmapviewer.interfaces.TileLoaderListener
    Task responsible for precaching imagery along the gpx track
    Since:
    8526
    • Constructor Summary

      Constructors 
      Constructor Description
      PrecacheTask​(ProgressMonitor progressMonitor, java.util.List<LatLon> points, double bufferX, double bufferY)
      Constructs a new PrecacheTask.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cancel()
      cancel the task
      int getTotalCount()
      Returns total number of tiles to download.
      boolean isFinished()
      Determines if the task is finished.
      void run()
      Execute the download
      private void shutdownTmsTileLoader()  
      void tileLoadingFinished​(org.openstreetmap.gui.jmapviewer.Tile tile, boolean success)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PrecacheTask

        public PrecacheTask​(ProgressMonitor progressMonitor,
                            java.util.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