OsmAnd
|
Public Member Functions | |
ResourceManager (OsmandApplication context) | |
MapTileDownloader | getMapTileDownloader () |
void | resetStoreDirectory () |
OsmandApplication | getContext () |
void | indexingImageTiles (IProgress progress) |
Bitmap | getTileImageForMapAsync (String file, ITileSource map, int x, int y, int zoom, boolean loadFromInternetIfNeeded) |
Bitmap | getTileImageFromCache (String file) |
Bitmap | getTileImageForMapSync (String file, ITileSource map, int x, int y, int zoom, boolean loadFromInternetIfNeeded) |
void | tileDownloaded (DownloadRequest request) |
synchronized boolean | tileExistOnFileSystem (String file, ITileSource map, int x, int y, int zoom) |
void | clearTileImageForMap (String file, ITileSource map, int x, int y, int zoom) |
synchronized String | calculateTileId (ITileSource map, int x, int y, int zoom) |
List< String > | reloadIndexes (IProgress progress) |
List< String > | indexingMaps (final IProgress progress) |
AmenityIndexRepositoryOdb | getUpdatablePoiDb () |
void | indexingPoi (final IProgress progress, List< String > warnings, File f) |
void | updateIndexLastDateModified (File f) |
List< Amenity > | searchAmenities (PoiFilter filter, double topLatitude, double leftLongitude, double bottomLatitude, double rightLongitude, double lat, double lon, ResultMatcher< Amenity > matcher) |
boolean | containsAmenityRepositoryToSearch (boolean searchByName) |
List< Amenity > | searchAmenitiesByName (String searchQuery, double topLatitude, double leftLongitude, double bottomLatitude, double rightLongitude, double lat, double lon, ResultMatcher< Amenity > matcher) |
Map< AmenityType, List< String > > | searchAmenityCategoriesByName (String searchQuery, double lat, double lon) |
void | searchAmenitiesAsync (double topLatitude, double leftLongitude, double bottomLatitude, double rightLongitude, int zoom, PoiFilter filter, List< Amenity > toFill) |
RegionAddressRepository | getRegionRepository (String name) |
Collection < RegionAddressRepository > | getAddressRepositories () |
List< TransportIndexRepository > | searchTransportRepositories (double latitude, double longitude) |
void | searchTransportAsync (double topLatitude, double leftLongitude, double bottomLatitude, double rightLongitude, int zoom, List< TransportStop > toFill) |
boolean | updateRenderedMapNeeded (RotatedTileBox rotatedTileBox, DrawSettings drawSettings) |
void | updateRendererMap (RotatedTileBox rotatedTileBox) |
void | interruptRendering () |
MapRenderRepositories | getRenderer () |
void | closeAmenities () |
void | closeAddresses () |
void | closeTransport () |
BusyIndicator | getBusyIndicator () |
synchronized void | setBusyIndicator (BusyIndicator busyIndicator) |
synchronized void | close () |
BinaryMapIndexReader[] | getRoutingMapFiles () |
void | closeRouteFiles () |
Map< String, String > | getIndexFileNames () |
Map< String, String > | getBackupIndexes (Map< String, String > map) |
synchronized void | reloadTilesFromFS () |
void | onLowMemory () |
On low memory method ///. | |
Public Attributes | |
final AsyncLoadingThread | asyncLoadingThread = new AsyncLoadingThread(this) |
Static Public Attributes | |
static final String | APP_DIR = "osmand/" |
static final String | POI_PATH = APP_DIR + IndexConstants.POI_INDEX_DIR |
static final String | VOICE_PATH = APP_DIR + IndexConstants.VOICE_INDEX_DIR |
static final String | GPX_PATH = "tracks" |
static final String | MAPS_PATH = APP_DIR |
static final String | BACKUP_PATH = "backup/" |
static final String | TILES_PATH = "tiles/" |
static final String | TEMP_SOURCE_TO_LOAD = "temp" |
static final String | VECTOR_MAP = "#vector_map" |
Protected Member Functions | |
Bitmap | getTileImageForMap (String file, ITileSource map, int x, int y, int zoom, boolean loadFromInternetIfNeeded, boolean sync, boolean loadFromFs) |
synchronized Bitmap | getTileImageForMap (String tileId, ITileSource map, int x, int y, int zoom, boolean loadFromInternetIfNeeded, boolean sync, boolean loadFromFs, boolean deleteBefore) |
Bitmap | getRequestedImageTile (TileLoadDownloadRequest req) |
synchronized void | clearTiles () |
Protected Attributes | |
int | maxImgCacheSize = 28 |
Map< String, Bitmap > | cacheOfImages = new LinkedHashMap<String, Bitmap>() |
Map< String, Boolean > | imagesOnFS = new LinkedHashMap<String, Boolean>() |
File | dirWithTiles |
final List < AmenityIndexRepository > | amenityRepositories = new ArrayList<AmenityIndexRepository>() |
final List < TransportIndexRepository > | transportRepositories = new ArrayList<TransportIndexRepository>() |
final Map< String, String > | indexFileNames = new LinkedHashMap<String, String>() |
final Map< String, BinaryMapIndexReader > | routingMapFiles = new LinkedHashMap<String, BinaryMapIndexReader>() |
final MapRenderRepositories | renderer |
final MapTileDownloader | tileDownloader |
boolean | internetIsNotAccessible = false |
AmenityIndexRepositoryOdb | updatablePoiDb = null |
StringBuilder | builder = new StringBuilder(40) |
char[] | tileId = new char[120] |
Static Protected Attributes | |
static ResourceManager | manager = null |
Resource manager is responsible to work with all resources that could consume memory (especially with file resources). Such as indexes, tiles. Also it is responsible to create cache for that resources if they can't be loaded fully into memory & clear them on request.
synchronized String net.osmand.plus.ResourceManager.calculateTileId | ( | ITileSource | map, |
int | x, | ||
int | y, | ||
int | zoom | ||
) |
void net.osmand.plus.ResourceManager.clearTileImageForMap | ( | String | file, |
ITileSource | map, | ||
int | x, | ||
int | y, | ||
int | zoom | ||
) |
synchronized void net.osmand.plus.ResourceManager.clearTiles | ( | ) | [protected] |
synchronized void net.osmand.plus.ResourceManager.close | ( | ) |
boolean net.osmand.plus.ResourceManager.containsAmenityRepositoryToSearch | ( | boolean | searchByName | ) |
Map<String, String> net.osmand.plus.ResourceManager.getBackupIndexes | ( | Map< String, String > | map | ) |
Map<String, String> net.osmand.plus.ResourceManager.getIndexFileNames | ( | ) |
MapTileDownloader net.osmand.plus.ResourceManager.getMapTileDownloader | ( | ) |
Bitmap net.osmand.plus.ResourceManager.getRequestedImageTile | ( | TileLoadDownloadRequest | req | ) | [protected] |
BinaryMapIndexReader [] net.osmand.plus.ResourceManager.getRoutingMapFiles | ( | ) |
Bitmap net.osmand.plus.ResourceManager.getTileImageForMap | ( | String | file, |
ITileSource | map, | ||
int | x, | ||
int | y, | ||
int | zoom, | ||
boolean | loadFromInternetIfNeeded, | ||
boolean | sync, | ||
boolean | loadFromFs | ||
) | [protected] |
file | - null could be passed if you do not call very often with that param |
synchronized Bitmap net.osmand.plus.ResourceManager.getTileImageForMap | ( | String | tileId, |
ITileSource | map, | ||
int | x, | ||
int | y, | ||
int | zoom, | ||
boolean | loadFromInternetIfNeeded, | ||
boolean | sync, | ||
boolean | loadFromFs, | ||
boolean | deleteBefore | ||
) | [protected] |
Bitmap net.osmand.plus.ResourceManager.getTileImageForMapAsync | ( | String | file, |
ITileSource | map, | ||
int | x, | ||
int | y, | ||
int | zoom, | ||
boolean | loadFromInternetIfNeeded | ||
) |
Bitmap net.osmand.plus.ResourceManager.getTileImageForMapSync | ( | String | file, |
ITileSource | map, | ||
int | x, | ||
int | y, | ||
int | zoom, | ||
boolean | loadFromInternetIfNeeded | ||
) |
Bitmap net.osmand.plus.ResourceManager.getTileImageFromCache | ( | String | file | ) |
void net.osmand.plus.ResourceManager.indexingImageTiles | ( | IProgress | progress | ) |
List<String> net.osmand.plus.ResourceManager.indexingMaps | ( | final IProgress | progress | ) |
void net.osmand.plus.ResourceManager.indexingPoi | ( | final IProgress | progress, |
List< String > | warnings, | ||
File | f | ||
) |
On low memory method ///.
List<String> net.osmand.plus.ResourceManager.reloadIndexes | ( | IProgress | progress | ) |
synchronized void net.osmand.plus.ResourceManager.reloadTilesFromFS | ( | ) |
List<Amenity> net.osmand.plus.ResourceManager.searchAmenities | ( | PoiFilter | filter, |
double | topLatitude, | ||
double | leftLongitude, | ||
double | bottomLatitude, | ||
double | rightLongitude, | ||
double | lat, | ||
double | lon, | ||
ResultMatcher< Amenity > | matcher | ||
) |
void net.osmand.plus.ResourceManager.searchAmenitiesAsync | ( | double | topLatitude, |
double | leftLongitude, | ||
double | bottomLatitude, | ||
double | rightLongitude, | ||
int | zoom, | ||
PoiFilter | filter, | ||
List< Amenity > | toFill | ||
) |
List<Amenity> net.osmand.plus.ResourceManager.searchAmenitiesByName | ( | String | searchQuery, |
double | topLatitude, | ||
double | leftLongitude, | ||
double | bottomLatitude, | ||
double | rightLongitude, | ||
double | lat, | ||
double | lon, | ||
ResultMatcher< Amenity > | matcher | ||
) |
Map<AmenityType, List<String> > net.osmand.plus.ResourceManager.searchAmenityCategoriesByName | ( | String | searchQuery, |
double | lat, | ||
double | lon | ||
) |
void net.osmand.plus.ResourceManager.searchTransportAsync | ( | double | topLatitude, |
double | leftLongitude, | ||
double | bottomLatitude, | ||
double | rightLongitude, | ||
int | zoom, | ||
List< TransportStop > | toFill | ||
) |
List<TransportIndexRepository> net.osmand.plus.ResourceManager.searchTransportRepositories | ( | double | latitude, |
double | longitude | ||
) |
synchronized void net.osmand.plus.ResourceManager.setBusyIndicator | ( | BusyIndicator | busyIndicator | ) |
void net.osmand.plus.ResourceManager.tileDownloaded | ( | DownloadRequest | request | ) |
synchronized boolean net.osmand.plus.ResourceManager.tileExistOnFileSystem | ( | String | file, |
ITileSource | map, | ||
int | x, | ||
int | y, | ||
int | zoom | ||
) |
void net.osmand.plus.ResourceManager.updateIndexLastDateModified | ( | File | f | ) |
boolean net.osmand.plus.ResourceManager.updateRenderedMapNeeded | ( | RotatedTileBox | rotatedTileBox, |
DrawSettings | drawSettings | ||
) |
void net.osmand.plus.ResourceManager.updateRendererMap | ( | RotatedTileBox | rotatedTileBox | ) |
final List<AmenityIndexRepository> net.osmand.plus.ResourceManager.amenityRepositories = new ArrayList<AmenityIndexRepository>() [protected] |
final String net.osmand.plus.ResourceManager.APP_DIR = "osmand/" [static] |
final AsyncLoadingThread net.osmand.plus.ResourceManager.asyncLoadingThread = new AsyncLoadingThread(this) |
final String net.osmand.plus.ResourceManager.BACKUP_PATH = "backup/" [static] |
StringBuilder net.osmand.plus.ResourceManager.builder = new StringBuilder(40) [protected] |
Map<String, Bitmap> net.osmand.plus.ResourceManager.cacheOfImages = new LinkedHashMap<String, Bitmap>() [protected] |
File net.osmand.plus.ResourceManager.dirWithTiles [protected] |
final String net.osmand.plus.ResourceManager.GPX_PATH = "tracks" [static] |
Map<String, Boolean> net.osmand.plus.ResourceManager.imagesOnFS = new LinkedHashMap<String, Boolean>() [protected] |
final Map<String, String> net.osmand.plus.ResourceManager.indexFileNames = new LinkedHashMap<String, String>() [protected] |
boolean net.osmand.plus.ResourceManager.internetIsNotAccessible = false [protected] |
ResourceManager net.osmand.plus.ResourceManager.manager = null [static, protected] |
final String net.osmand.plus.ResourceManager.MAPS_PATH = APP_DIR [static] |
int net.osmand.plus.ResourceManager.maxImgCacheSize = 28 [protected] |
final String net.osmand.plus.ResourceManager.POI_PATH = APP_DIR + IndexConstants.POI_INDEX_DIR [static] |
final MapRenderRepositories net.osmand.plus.ResourceManager.renderer [protected] |
final Map<String, BinaryMapIndexReader> net.osmand.plus.ResourceManager.routingMapFiles = new LinkedHashMap<String, BinaryMapIndexReader>() [protected] |
final String net.osmand.plus.ResourceManager.TEMP_SOURCE_TO_LOAD = "temp" [static] |
final MapTileDownloader net.osmand.plus.ResourceManager.tileDownloader [protected] |
char [] net.osmand.plus.ResourceManager.tileId = new char[120] [protected] |
final String net.osmand.plus.ResourceManager.TILES_PATH = "tiles/" [static] |
final List<TransportIndexRepository> net.osmand.plus.ResourceManager.transportRepositories = new ArrayList<TransportIndexRepository>() [protected] |
AmenityIndexRepositoryOdb net.osmand.plus.ResourceManager.updatablePoiDb = null [protected] |
final String net.osmand.plus.ResourceManager.VECTOR_MAP = "#vector_map" [static] |
final String net.osmand.plus.ResourceManager.VOICE_PATH = APP_DIR + IndexConstants.VOICE_INDEX_DIR [static] |