public class CacheManager extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
CacheManager.CacheManagerCallback |
protected class |
CacheManager.CacheManagerTask
generic class for common code related to AsyncTask management
|
protected class |
CacheManager.CleaningTask |
protected class |
CacheManager.DownloadingTask |
Modifier and Type | Field and Description |
---|---|
protected MapView |
mMapView |
protected MapTileProviderBase |
mTileProvider |
protected IFilesystemCache |
mTileWriter |
Constructor and Description |
---|
CacheManager(MapView mapView) |
CacheManager(MapView mapView,
IFilesystemCache writer) |
Modifier and Type | Method and Description |
---|---|
long |
cacheCapacity() |
void |
cleanAreaAsync(Context ctx,
ArrayList<GeoPoint> geoPoints,
int zoomMin,
int zoomMax)
Remove all cached tiles covered by the GeoPoints list.
|
void |
cleanAreaAsync(Context ctx,
BoundingBox bb,
int zoomMin,
int zoomMax)
Remove all cached tiles in the specified area.
|
long |
currentCacheUsage() |
long |
directorySize(File pDirectory) |
void |
downloadAreaAsync(Context ctx,
ArrayList<GeoPoint> geoPoints,
int zoomMin,
int zoomMax)
Download in background all tiles of the specified area in osmdroid cache.
|
void |
downloadAreaAsync(Context ctx,
ArrayList<GeoPoint> geoPoints,
int zoomMin,
int zoomMax,
CacheManager.CacheManagerCallback callback)
Download in background all tiles covered by the GePoints list in osmdroid cache.
|
void |
downloadAreaAsync(Context ctx,
BoundingBox bb,
int zoomMin,
int zoomMax)
Download in background all tiles of the specified area in osmdroid cache.
|
void |
downloadAreaAsync(Context ctx,
BoundingBox bb,
int zoomMin,
int zoomMax,
CacheManager.CacheManagerCallback callback)
Download in background all tiles of the specified area in osmdroid cache.
|
void |
downloadAreaAsyncNoUI(Context ctx,
ArrayList<GeoPoint> geoPoints,
int zoomMin,
int zoomMax,
CacheManager.CacheManagerCallback callback)
Download in background all tiles covered by the GeoPoints list in osmdroid cache without a user interface.
|
void |
downloadAreaAsyncNoUI(Context ctx,
BoundingBox bb,
int zoomMin,
int zoomMax,
CacheManager.CacheManagerCallback callback)
Download in background all tiles of the specified area in osmdroid cache without a user interface.
|
BoundingBox |
extendedBoundsFromGeoPoints(ArrayList<GeoPoint> geoPoints,
int minZoomLevel) |
static GeoPoint |
getCoordinatesFromMapTile(int x,
int y,
int zoom) |
static File |
getFileName(ITileSource tileSource,
MapTile tile) |
static Point |
getMapTileFromCoordinates(double aLat,
double aLon,
int zoom) |
boolean |
loadTile(OnlineTileSourceBase tileSource,
MapTile tile) |
int |
possibleTilesCovered(ArrayList<GeoPoint> geoPoints,
int zoomMin,
int zoomMax) |
int |
possibleTilesInArea(BoundingBox bb,
int zoomMin,
int zoomMax) |
protected String |
zoomMessage(int zoomLevel,
int zoomMin,
int zoomMax) |
protected final MapTileProviderBase mTileProvider
protected final IFilesystemCache mTileWriter
protected final MapView mMapView
public CacheManager(MapView mapView)
public CacheManager(MapView mapView, IFilesystemCache writer)
public static Point getMapTileFromCoordinates(double aLat, double aLon, int zoom)
public static GeoPoint getCoordinatesFromMapTile(int x, int y, int zoom)
public static File getFileName(ITileSource tileSource, MapTile tile)
public boolean loadTile(OnlineTileSourceBase tileSource, MapTile tile)
public int possibleTilesInArea(BoundingBox bb, int zoomMin, int zoomMax)
public int possibleTilesCovered(ArrayList<GeoPoint> geoPoints, int zoomMin, int zoomMax)
protected String zoomMessage(int zoomLevel, int zoomMin, int zoomMax)
public void downloadAreaAsync(Context ctx, BoundingBox bb, int zoomMin, int zoomMax)
ctx
- bb
- zoomMin
- zoomMax
- public void downloadAreaAsync(Context ctx, ArrayList<GeoPoint> geoPoints, int zoomMin, int zoomMax)
ctx
- geoPoints
- zoomMin
- zoomMax
- public void downloadAreaAsync(Context ctx, BoundingBox bb, int zoomMin, int zoomMax, CacheManager.CacheManagerCallback callback)
ctx
- bb
- zoomMin
- zoomMax
- public void downloadAreaAsync(Context ctx, ArrayList<GeoPoint> geoPoints, int zoomMin, int zoomMax, CacheManager.CacheManagerCallback callback)
ctx
- geoPoints
- zoomMin
- zoomMax
- public void downloadAreaAsyncNoUI(Context ctx, ArrayList<GeoPoint> geoPoints, int zoomMin, int zoomMax, CacheManager.CacheManagerCallback callback)
ctx
- geoPoints
- zoomMin
- zoomMax
- public void downloadAreaAsyncNoUI(Context ctx, BoundingBox bb, int zoomMin, int zoomMax, CacheManager.CacheManagerCallback callback)
ctx
- bb
- zoomMin
- zoomMax
- public void cleanAreaAsync(Context ctx, BoundingBox bb, int zoomMin, int zoomMax)
ctx
- bb
- zoomMin
- zoomMax
- public void cleanAreaAsync(Context ctx, ArrayList<GeoPoint> geoPoints, int zoomMin, int zoomMax)
ctx
- geoPoints
- zoomMin
- zoomMax
- public BoundingBox extendedBoundsFromGeoPoints(ArrayList<GeoPoint> geoPoints, int minZoomLevel)
public long currentCacheUsage()
public long cacheCapacity()
public long directorySize(File pDirectory)