Fix online maps

This commit is contained in:
vshcherb 2013-10-27 15:02:34 +01:00
parent 5fda2e00b2
commit 73e881a821
2 changed files with 8 additions and 4 deletions

View file

@ -92,8 +92,8 @@ public class ResourceManager {
// at least 3*9?
protected int maxImgCacheSize = 28;
protected Map<String, Bitmap> cacheOfImages = new LinkedHashMap<String, Bitmap>();
protected Map<String, Boolean> imagesOnFS = new LinkedHashMap<String, Boolean>() ;
protected Map<String, Bitmap> cacheOfImages = new ConcurrentHashMap<String, Bitmap>();
protected Map<String, Boolean> imagesOnFS = new ConcurrentHashMap<String, Boolean>() ;
protected File dirWithTiles ;

View file

@ -537,8 +537,12 @@ public class OsmandMapTileView extends SurfaceView implements IMapDownloaderCall
@Override
public void run() {
baseHandler.removeMessages(BASE_REFRESH_MESSAGE);
refreshBaseMapInternal(currentViewport.copy(), drawSettings);
sendRefreshMapMsg(drawSettings, 0);
try {
refreshBaseMapInternal(currentViewport.copy(), drawSettings);
sendRefreshMapMsg(drawSettings, 0);
} catch(Exception e) {
log.error(e.getMessage(), e);
}
}
});
msg.what = BASE_REFRESH_MESSAGE;