public final class StreetsideDownloader extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
StreetsideDownloader.DOWNLOAD_MODE
Possible download modes.
|
| Modifier and Type | Field and Description |
|---|---|
private static java.util.concurrent.ThreadPoolExecutor |
executor
Executor that will run the petitions.
|
(package private) static org.apache.log4j.Logger |
logger |
private static double |
MAX_AREA
Max area to be downloaded
|
private static boolean |
stoppedDownload
Indicates whether the last download request has been rejected because it requested an area that was too big.
|
| Modifier | Constructor and Description |
|---|---|
private |
StreetsideDownloader() |
| Modifier and Type | Method and Description |
|---|---|
static void |
downloadOSMArea()
Downloads all images of the area covered by the OSM data.
|
static void |
downloadVisibleArea()
If some part of the current view has not been downloaded, it is downloaded.
|
static void |
getImages(org.openstreetmap.josm.data.Bounds bounds)
Gets the images within the given bounds.
|
static void |
getImages(org.openstreetmap.josm.data.coor.LatLon minLatLon,
org.openstreetmap.josm.data.coor.LatLon maxLatLon)
Gets all the images in a square.
|
static StreetsideDownloader.DOWNLOAD_MODE |
getMode()
Returns the current download mode.
|
private static boolean |
isAreaTooBig(double area)
Checks if the area for which Streetside images should be downloaded is too big.
|
private static boolean |
isInBounds(org.openstreetmap.josm.data.coor.LatLon latlon)
Checks if the given
LatLon object lies inside the bounds of the
image. |
private static boolean |
isViewDownloaded(org.openstreetmap.josm.data.Bounds view) |
private static void |
run(java.lang.Runnable t) |
static void |
stopAll()
Stops all running threads.
|
static final org.apache.log4j.Logger logger
private static final double MAX_AREA
private static java.util.concurrent.ThreadPoolExecutor executor
private static boolean stoppedDownload
private StreetsideDownloader()
public static void getImages(org.openstreetmap.josm.data.coor.LatLon minLatLon, org.openstreetmap.josm.data.coor.LatLon maxLatLon)
minLatLon - The minimum latitude and longitude of the rectangle.maxLatLon - The maximum latitude and longitude of the rectanglepublic static void getImages(org.openstreetmap.josm.data.Bounds bounds)
bounds - A Bounds object containing the area to be downloaded.public static StreetsideDownloader.DOWNLOAD_MODE getMode()
StreetsideDownloader.DOWNLOAD_MODEprivate static void run(java.lang.Runnable t)
public static void downloadVisibleArea()
private static boolean isViewDownloaded(org.openstreetmap.josm.data.Bounds view)
private static boolean isInBounds(org.openstreetmap.josm.data.coor.LatLon latlon)
LatLon object lies inside the bounds of the
image.latlon - The coordinates to check.public static void downloadOSMArea()
private static boolean isAreaTooBig(double area)
area - area to checktrue if the area is too bigpublic static void stopAll()