Changeset 31409 in osm for applications


Ignore:
Timestamp:
2015-07-27T14:08:33+02:00 (9 years ago)
Author:
nokutu
Message:

Fixed several concurrency bugs and improved Mapillary data download speed by allowing multiple threads.

Location:
applications/editors/josm/plugins/mapillary
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryAbstractImage.java

    r31390 r31409  
    2424   * to prevent concurrency problems.
    2525   */
    26   public static Lock lock = new ReentrantLock();
     26  public static Lock LOCK = new ReentrantLock();
    2727
    2828  /** The time the image was captured, in Epoch format. */
     
    281281   */
    282282  public MapillaryAbstractImage next() {
    283     synchronized (lock) {
     283    synchronized (LOCK) {
    284284      if (this.getSequence() == null)
    285285        return null;
     
    295295   */
    296296  public MapillaryAbstractImage previous() {
    297     synchronized (lock) {
     297    synchronized (LOCK) {
    298298      if (this.getSequence() == null)
    299299        return null;
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryData.java

    r31404 r31409  
    209209  /**
    210210   * If the selected MapillaryImage is part of a MapillarySequence then the
     211   * following visible MapillaryImage is selected. In case there is none, does
     212   * nothing.
     213   *
     214   * @param moveToPicture
     215   *          True if the view must me moved to the next picture.
     216   */
     217  public void selectNext(boolean moveToPicture) {
     218    if (getSelectedImage() == null)
     219      return;
     220    if (getSelectedImage().getSequence() == null)
     221      return;
     222    MapillaryAbstractImage tempImage = selectedImage;
     223    while (tempImage.next() != null) {
     224      tempImage = tempImage.next();
     225      if (tempImage.isVisible()) {
     226        setSelectedImage(tempImage, moveToPicture);
     227        break;
     228      }
     229    }
     230  }
     231
     232  /**
     233   * If the selected MapillaryImage is part of a MapillarySequence then the
    211234   * previous visible MapillaryImage is selected. In case there is none, does
    212235   * nothing.
     
    229252
    230253  /**
     254   * If the selected MapillaryImage is part of a MapillarySequence then the
     255   * previous visible MapillaryImage is selected. In case there is none, does
     256   * nothing.
     257   *
     258   * @param moveToPicture
     259   *          True if the view must me moved to the previous picture.
     260   */
     261  public void selectPrevious(boolean moveToPicture) {
     262    if (getSelectedImage() == null)
     263      return;
     264    if (getSelectedImage().getSequence() == null)
     265      throw new IllegalStateException();
     266    MapillaryAbstractImage tempImage = selectedImage;
     267    while (tempImage.previous() != null) {
     268      tempImage = tempImage.previous();
     269      if (tempImage.isVisible()) {
     270        setSelectedImage(tempImage, moveToPicture);
     271        break;
     272      }
     273    }
     274  }
     275
     276  /**
    231277   * Selects a new image.If the user does ctrl + click, this isn't triggered.
    232278   *
     
    248294   */
    249295  public void setSelectedImage(MapillaryAbstractImage image, boolean zoom) {
    250     if (image != null) {
    251       System.out.println("----------------------------");
    252       for (MapillaryAbstractImage img : getImages())
    253         System.out.println(img.getSequence());
    254     }
    255296    MapillaryAbstractImage oldImage = selectedImage;
    256297    selectedImage = image;
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryImage.java

    r31401 r31409  
    2222
    2323  /**
    24    * Returns the localtion where the image was taken.
     24   * Returns the location where the image was taken.
    2525   *
    2626   * @return A String containing the location where the picture was taken.
     
    4040
    4141  /**
    42    * Main contructor of the class MapillaryImage
     42   * Main constructor of the class MapillaryImage
    4343   *
    4444   * @param key
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/MapillaryLayer.java

    r31404 r31409  
    153153   */
    154154  public synchronized static MapillaryLayer getInstance() {
    155     if (MapillaryLayer.INSTANCE == null)
    156       MapillaryLayer.INSTANCE = new MapillaryLayer();
     155    if (INSTANCE == null)
     156      INSTANCE = new MapillaryLayer();
    157157    return MapillaryLayer.INSTANCE;
    158158  }
     
    171171  public void destroy() {
    172172    setMode(null);
     173    AbstractMode.resetThread();
    173174    MapillaryDownloader.stopAll();
    174175    MapillaryMainDialog.getInstance().setImage(null);
     
    181182    if (Main.map.mapView.getEditLayer() != null)
    182183      Main.map.mapView.getEditLayer().data.removeDataSetListener(this);
     184    MapillaryData.INSTANCE = null;
    183185    MapillaryLayer.INSTANCE = null;
    184186    super.destroy();
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryDownloadAction.java

    r31401 r31409  
    1212import org.openstreetmap.josm.actions.JosmAction;
    1313import org.openstreetmap.josm.plugins.mapillary.MapillaryLayer;
    14 import org.openstreetmap.josm.plugins.mapillary.downloads.MapillaryDownloader;
    1514import org.openstreetmap.josm.tools.ImageProvider;
    1615import org.openstreetmap.josm.tools.Shortcut;
     
    4140  public void actionPerformed(ActionEvent arg0) {
    4241    if (MapillaryLayer.INSTANCE == null) {
    43       if (Main.map.mapView.getEditLayer() != null)
    44         MapillaryDownloader.automaticDownload();
     42      MapillaryLayer.getInstance();
    4543    } else {
    4644      if (Main.map.mapView.getActiveLayer() != MapillaryLayer.getInstance())
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/MapillaryWalkAction.java

    r31401 r31409  
    5757        && (int) pane.getValue() == JOptionPane.OK_OPTION) {
    5858      thread = new WalkThread((int) dialog.spin.getValue(),
    59           dialog.waitForPicture.isSelected());
     59          dialog.waitForPicture.isSelected(), dialog.followSelection.isSelected());
    6060      fireWalkStarted();
    6161      thread.start();
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/actions/WalkThread.java

    r31401 r31409  
    44import java.util.concurrent.locks.Lock;
    55import java.util.concurrent.locks.ReentrantLock;
     6
     7import javax.swing.SwingUtilities;
    68
    79import org.openstreetmap.josm.plugins.mapillary.MapillaryAbstractImage;
     
    2426  private Lock lock = new ReentrantLock();
    2527  private boolean end = false;
    26   private boolean waitForPicture;
     28  private final boolean waitForFullQuality;
     29  private final boolean followSelected;
    2730  private BufferedImage lastImage;
    2831  private volatile boolean paused = false;
     
    3336   * @param interval
    3437   * @param waitForPicture
     38   * @param followSelected
    3539   */
    36   public WalkThread(int interval, boolean waitForPicture) {
     40  public WalkThread(int interval, boolean waitForPicture, boolean followSelected) {
    3741    this.interval = interval;
    38     this.waitForPicture = waitForPicture;
     42    this.waitForFullQuality = waitForPicture;
     43    this.followSelected = followSelected;
    3944    data = MapillaryLayer.getInstance().getMapillaryData();
    4045    data.addListener(this);
     
    4651      while (!end && data.getSelectedImage().next() != null) {
    4752        MapillaryAbstractImage image = data.getSelectedImage();
    48         // Predownload next 5 pictures.
    4953        if (image instanceof MapillaryImage) {
    50           for (int i = 0; i < 5; i++) {
     54          // Predownload next 10 thumbnails.
     55          for (int i = 0; i < 10; i++) {
    5156            if (image.next() == null)
    5257              break;
    5358            image = image.next();
    54             Utils.downloadPicture((MapillaryImage) image);
     59            Utils.downloadPicture((MapillaryImage) image, Utils.PICTURE.THUMBNAIL);
    5560          }
    5661        }
     62        if (waitForFullQuality)
     63          // Start downloading 3 next full images.
     64          for (int i = 0; i < 3; i++) {
     65            if (image.next() == null)
     66              break;
     67            image = image.next();
     68            Utils.downloadPicture((MapillaryImage) image, Utils.PICTURE.FULL);
     69          }
    5770        try {
    5871          synchronized (this) {
    59             if (waitForPicture
     72            if (waitForFullQuality
    6073                && data.getSelectedImage() instanceof MapillaryImage) {
    6174              while (MapillaryMainDialog.getInstance().mapillaryImageDisplay
     
    8497              .getImage();
    8598          synchronized (lock) {
    86             data.selectNext();
     99            data.selectNext(followSelected);
    87100          }
    88101        } catch (InterruptedException e) {
     
    93106      return;
    94107    }
    95     end = true;
    96     data.removeListener(this);
    97     MapillaryMainDialog.getInstance().setMode(MapillaryMainDialog.Mode.NORMAL);
     108    end();
    98109  }
    99110
    100111  @Override
    101112  public void interrupt() {
    102     end = true;
    103     data.removeListener(this);
    104     MapillaryMainDialog.getInstance().setMode(MapillaryMainDialog.Mode.NORMAL);
    105113    super.interrupt();
    106114  }
     
    139147   */
    140148  public void stopWalk() {
    141     this.interrupt();
     149    if (!SwingUtilities.isEventDispatchThread()) {
     150      SwingUtilities.invokeLater(new Runnable() {
     151        @Override
     152        public void run() {
     153          stopWalk();
     154        }
     155      });
     156    } else {
     157      end();
     158      this.interrupt();
     159    }
     160  }
     161
     162  /**
     163   * Called when the walk stops by itself of forcefully.
     164   */
     165  public void end() {
     166    if (!SwingUtilities.isEventDispatchThread()) {
     167      SwingUtilities.invokeLater(new Runnable() {
     168        @Override
     169        public void run() {
     170          end();
     171        }
     172      });
     173    } else {
     174      end = true;
     175      data.removeListener(this);
     176      MapillaryMainDialog.getInstance()
     177          .setMode(MapillaryMainDialog.Mode.NORMAL);
     178    }
    142179  }
    143180}
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/cache/Utils.java

    r31401 r31409  
    1616  private static IgnoreDownload IGNORE_DOWNLOAD = new IgnoreDownload();
    1717
     18  /** Picture quality */
     19  public enum PICTURE {
     20    /** Thumbnail quality picture () */
     21    THUMBNAIL,
     22    /** Full quality picture () */
     23    FULL,
     24    /** Both of them */
     25    BOTH;
     26  }
     27
    1828  /**
    1929   * Downloads the picture of the given image and does nothing when it is
     
    2333   */
    2434  public static void downloadPicture(MapillaryImage img) {
    25     new MapillaryCache(img.getKey(), MapillaryCache.Type.THUMBNAIL).submit(
    26         IGNORE_DOWNLOAD, false);
    27     new MapillaryCache(img.getKey(), MapillaryCache.Type.FULL_IMAGE).submit(
    28         IGNORE_DOWNLOAD, false);
     35    downloadPicture(img, PICTURE.BOTH);
     36  }
     37
     38  /**
     39   * Downloads the picture of the given image and does nothing when it is
     40   * downloaded.
     41   *
     42   * @param img
     43   * @param pic
     44   *          The picture type to be downloaded (full quality, thumbnail or
     45   *          both.)
     46   */
     47  public static void downloadPicture(MapillaryImage img, PICTURE pic) {
     48    if (pic == PICTURE.BOTH) {
     49      if (new MapillaryCache(img.getKey(), MapillaryCache.Type.THUMBNAIL).get() == null)
     50        new MapillaryCache(img.getKey(), MapillaryCache.Type.THUMBNAIL).submit(
     51            IGNORE_DOWNLOAD, false);
     52      if (new MapillaryCache(img.getKey(), MapillaryCache.Type.FULL_IMAGE)
     53          .get() == null)
     54        new MapillaryCache(img.getKey(), MapillaryCache.Type.FULL_IMAGE)
     55            .submit(IGNORE_DOWNLOAD, false);
     56    } else if (pic == PICTURE.THUMBNAIL
     57        && new MapillaryCache(img.getKey(), MapillaryCache.Type.THUMBNAIL)
     58            .get() == null) {
     59      new MapillaryCache(img.getKey(), MapillaryCache.Type.THUMBNAIL).submit(
     60          IGNORE_DOWNLOAD, false);
     61    } else if (pic == PICTURE.FULL
     62        && new MapillaryCache(img.getKey(), MapillaryCache.Type.FULL_IMAGE)
     63            .get() == null) {
     64      new MapillaryCache(img.getKey(), MapillaryCache.Type.FULL_IMAGE).submit(
     65          IGNORE_DOWNLOAD, false);
     66    }
    2967  }
    3068
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryDownloader.java

    r31404 r31409  
    3434  /** Client ID for the app */
    3535  public final static String CLIENT_ID = "NzNRM2otQkR2SHJzaXJmNmdQWVQ0dzo1YTA2NmNlODhlNWMwOTBm";
    36   /** Executor that will run the petitions */
    37   public final static ThreadPoolExecutor EXECUTOR = new ThreadPoolExecutor(1,
    38       1, 100, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(50));
     36  /** Executor that will run the petitions. */
     37  private static ThreadPoolExecutor EXECUTOR = new ThreadPoolExecutor(3, 5,
     38      100, TimeUnit.SECONDS, new ArrayBlockingQueue<Runnable>(50));
    3939
    4040  /**
     
    6969    if (view.getArea() > MapillaryDownloadViewAction.MAX_AREA)
    7070      return;
    71     for (Bounds bound : MapillaryLayer.getInstance().bounds) {
    72       if (!view.intersects(bound))
    73         continue;
    74       if (bound.equals(view)) {
    75         // Already downloaded
    76         return;
     71    if (isViewDownloaded(view))
     72      return;
     73    MapillaryLayer.getInstance().bounds.add(view);
     74    getImages(view);
     75  }
     76
     77  private static boolean isViewDownloaded(Bounds view) {
     78    int n = 15;
     79    boolean[][] inside = new boolean[n][n];
     80    for (int i = 0; i < n; i++) {
     81      for (int j = 0; j < n; j++) {
     82        if (isInBounds(new LatLon(view.getMinLat()
     83            + (view.getMaxLat() - view.getMinLat()) * ((double) i / n), view.getMinLon()
     84 + (view.getMaxLon() - view.getMinLon())
     85                * ((double) j / n)))) {
     86          inside[i][j] = true;
     87        }
    7788      }
    7889    }
    79     MapillaryLayer.getInstance().bounds.add(view);
    80     getImages(view);
     90    for (int i = 0; i < n; i++) {
     91      for (int j = 0; j < n; j++) {
     92        if (!inside[i][j])
     93          return false;
     94      }
     95    }
     96    return true;
     97  }
     98
     99  private static boolean isInBounds(LatLon latlon) {
     100    for (Bounds bounds : MapillaryLayer.getInstance().bounds) {
     101      if (bounds.contains(latlon))
     102        return true;
     103    }
     104    return false;
    81105  }
    82106
     
    137161  public static void stopAll() {
    138162    EXECUTOR.shutdownNow();
     163    EXECUTOR = new ThreadPoolExecutor(3, 5, 100, TimeUnit.SECONDS,
     164        new ArrayBlockingQueue<Runnable>(50));
    139165  }
    140166}
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySequenceDownloadThread.java

    r31400 r31409  
    1313import java.util.List;
    1414import java.util.concurrent.ExecutorService;
     15import java.util.concurrent.locks.Lock;
     16import java.util.concurrent.locks.ReentrantLock;
    1517
    1618import org.openstreetmap.josm.Main;
    17 import org.openstreetmap.josm.data.Bounds;
    1819import org.openstreetmap.josm.plugins.mapillary.MapillaryAbstractImage;
    1920import org.openstreetmap.josm.plugins.mapillary.MapillaryImage;
     
    3233  private static final String URL = MapillaryDownloader.BASE_URL + "search/s/";
    3334
     35  /** Lock to prevent multiple downloads to be imported at the same time. */
     36  private static final Lock LOCK = new ReentrantLock();
     37
    3438  private final String queryString;
    3539  private final ExecutorService ex;
    36   private final List<Bounds> bounds;
    3740  private final MapillaryLayer layer;
    38   private final MapillarySquareDownloadManagerThread manager;
    3941
    4042  /**
     
    4345   * @param ex
    4446   * @param queryString
    45    * @param layer
    4647   * @param manager
    4748   */
    4849  public MapillarySequenceDownloadThread(ExecutorService ex,
    49       String queryString, MapillaryLayer layer,
    50       MapillarySquareDownloadManagerThread manager) {
     50      String queryString) {
    5151    this.queryString = queryString;
    5252    this.ex = ex;
    53     this.bounds = layer.bounds;
    54     this.layer = layer;
    55     this.manager = manager;
     53    this.layer = MapillaryLayer.getInstance();
    5654  }
    5755
     
    9896        }
    9997
    100         boolean imagesAdded = false;
    101         MapillaryImage.lock.lock();
    102         for (MapillaryImage img : finalImages) {
    103           if (layer.getMapillaryData().getImages().contains(img)) {
    104             // The image in finalImages is substituted by the one in the
    105             // database, as they are equal.
    106             img = (MapillaryImage) layer.getMapillaryData().getImages()
    107                 .get(layer.getMapillaryData().getImages().indexOf(img));
    108             sequence.add(img);
    109             ((MapillaryImage) layer.getMapillaryData().getImages()
    110                 .get(layer.getMapillaryData().getImages().indexOf(img)))
    111                 .setSequence(sequence);
    112             finalImages.set(finalImages.indexOf(img), img);
    113           } else {
    114             img.setSequence(sequence);
    115             imagesAdded = true;
    116             sequence.add(img);
     98        MapillaryImage.LOCK.lock();
     99        synchronized (LOCK) {
     100          for (MapillaryImage img : finalImages) {
     101            if (layer.getMapillaryData().getImages().contains(img)) {
     102              // The image in finalImages is substituted by the one in the
     103              // database, as they represent the same picture.
     104              img = (MapillaryImage) layer.getMapillaryData().getImages()
     105                  .get(layer.getMapillaryData().getImages().indexOf(img));
     106              sequence.add(img);
     107              ((MapillaryImage) layer.getMapillaryData().getImages()
     108                  .get(layer.getMapillaryData().getImages().indexOf(img)))
     109                  .setSequence(sequence);
     110              finalImages.set(finalImages.indexOf(img), img);
     111            } else {
     112              img.setSequence(sequence);
     113              sequence.add(img);
     114            }
    117115          }
    118116        }
    119         MapillaryImage.lock.unlock();
    120         if (manager != null) {
    121           manager.imagesAdded = imagesAdded;
    122         }
     117        MapillaryImage.LOCK.unlock();
     118
    123119        layer.getMapillaryData().addWithoutUpdate(
    124120            new ArrayList<MapillaryAbstractImage>(finalImages));
     
    131127
    132128  private boolean isInside(MapillaryAbstractImage image) {
    133     for (int i = 0; i < bounds.size(); i++)
    134       if (bounds.get(i).contains(image.getLatLon()))
     129    for (int i = 0; i < layer.bounds.size(); i++)
     130      if (layer.bounds.get(i).contains(image.getLatLon()))
    135131        return true;
    136132    return false;
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillarySquareDownloadManagerThread.java

    r31404 r31409  
    3131  private final String signQueryString;
    3232  private final MapillaryLayer layer;
    33   /** Whether if new images have been added in the download or not. */
    34   public boolean imagesAdded = false;
    3533
    3634  /**
     
    7573    try {
    7674      downloadSequences();
    77       if (imagesAdded) {
    78         Main.map.statusLine.setHelpText(tr("Downloading image's information"));
    79         completeImages();
    80         MapillaryMainDialog.getInstance().updateTitle();
    81         Main.map.statusLine.setHelpText(tr("Downloading traffic signs"));
    82         downloadSigns();
    83       }
     75      Main.map.statusLine.setHelpText(tr("Downloading image's information"));
     76      completeImages();
     77      MapillaryMainDialog.getInstance().updateTitle();
     78      Main.map.statusLine.setHelpText(tr("Downloading traffic signs"));
     79      downloadSigns();
    8480    } catch (InterruptedException e) {
    8581      Main.error("Mapillary download interrupted (probably because of closing the layer).");
     
    9793    while (!ex.isShutdown()) {
    9894      ex.execute(new MapillarySequenceDownloadThread(ex, sequenceQueryString
    99           + "&page=" + page + "&limit=10", layer, this));
     95          + "&page=" + page + "&limit=10"));
    10096      while (ex.getQueue().remainingCapacity() == 0)
    10197        Thread.sleep(500);
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryTrafficSignDownloaderThread.java

    r31401 r31409  
    1919/**
    2020 * Downloads the signs information in a given area.
    21  * 
     21 *
    2222 * @author nokutu
    2323 *
     
    3232  /**
    3333   * Main constructor.
    34    * 
     34   *
    3535   * @param ex
    3636   *          {@link ExecutorService} object that is executing this thread.
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryMainDialog.java

    r31398 r31409  
    503503      });
    504504    } else if (data != null && result == LoadResult.SUCCESS) {
     505      System.out.println(attributes.getMetadata());
    505506      try {
    506507        BufferedImage img = ImageIO.read(new ByteArrayInputStream(data
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryWalkDialog.java

    r31401 r31409  
    1010/**
    1111 * Dialog to set the walk mode options.
    12  * 
     12 *
    1313 * @author nokutu
    1414 *
     
    2222  /** Whether it must wait for the picture to be downloaded */
    2323  public JCheckBox waitForPicture;
     24  /** Whether the view must follow the selected image. */
     25  public JCheckBox followSelection;
    2426
    2527  /**
     
    3335    add(interval);
    3436
    35     waitForPicture = new JCheckBox("Wait for the picture to be downloaded");
     37    waitForPicture = new JCheckBox("Wait for full quality pictures");
    3638    waitForPicture.setSelected(true);
    3739    add(waitForPicture);
     40
     41    followSelection = new JCheckBox("Follow selected image");
     42    followSelection.setSelected(true);
     43    add(followSelection);
    3844  }
    3945}
  • applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/mode/AbstractMode.java

    r31404 r31409  
    2626    ZoomChangeListener {
    2727
     28  private final static int DOWNLOAD_COOLDOWN = 2000;
     29
    2830  protected MapillaryData data = MapillaryData.getInstance();
    29   private static final SemiautomaticThread semiautomaticThread = new SemiautomaticThread();
     31  private static SemiautomaticThread semiautomaticThread = new SemiautomaticThread();
    3032
    3133  /**
     
    7173  }
    7274
     75  /**
     76   * Resets the semiautomatic mode thread.
     77   */
     78  public static void resetThread() {
     79    semiautomaticThread.interrupt();
     80    semiautomaticThread = new SemiautomaticThread();
     81  }
     82
    7383  private static class SemiautomaticThread extends Thread {
    7484
     
    8292      while (true) {
    8393        if (moved
    84             && Calendar.getInstance().getTimeInMillis() - lastDownload >= 2000) {
     94            && Calendar.getInstance().getTimeInMillis() - lastDownload >= DOWNLOAD_COOLDOWN) {
    8595          lastDownload = Calendar.getInstance().getTimeInMillis();
    8696          MapillaryDownloader.completeView();
     
    92102            wait(100);
    93103          } catch (InterruptedException e) {
    94             Main.error(e);
    95104          }
    96105        }
  • applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/MapillarySequenceDownloadThreadTest.java

    r31381 r31409  
    6262        while (!ex.isShutdown() && MapillaryLayer.getInstance().getMapillaryData().getImages().size() <= 0 && page < 50) {
    6363            System.out.println("Sending sequence-request "+page+" to Mapillary-servers…");
    64             Thread downloadThread = new MapillarySequenceDownloadThread(ex, queryString+"&page="+page, MapillaryLayer.getInstance(), null);
     64            Thread downloadThread = new MapillarySequenceDownloadThread(ex, queryString+"&page="+page);
    6565            downloadThread.start();
    6666            downloadThread.join();
Note: See TracChangeset for help on using the changeset viewer.