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? // at least 3*9?
protected int maxImgCacheSize = 28; protected int maxImgCacheSize = 28;
protected Map<String, Bitmap> cacheOfImages = new LinkedHashMap<String, Bitmap>(); protected Map<String, Bitmap> cacheOfImages = new ConcurrentHashMap<String, Bitmap>();
protected Map<String, Boolean> imagesOnFS = new LinkedHashMap<String, Boolean>() ; protected Map<String, Boolean> imagesOnFS = new ConcurrentHashMap<String, Boolean>() ;
protected File dirWithTiles ; protected File dirWithTiles ;

View file

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