start render early

This commit is contained in:
Hannes Janetzek
2013-02-01 04:31:39 +01:00
parent a8c2f72a35
commit 019c39d8b8
10 changed files with 58 additions and 35 deletions

View File

@@ -274,11 +274,15 @@ public class MapView extends RelativeLayout {
/**
* Calculates all necessary tiles and adds jobs accordingly.
* @param changedPos TODO
*/
public void redrawMap() {
public void redrawMap(boolean changedPos) {
if (mPausing || this.getWidth() == 0 || this.getHeight() == 0)
return;
if (changedPos)
render();
if (AndroidUtils.currentThreadIsUiThread()) {
boolean changed = mMapViewPosition.getMapPosition(mMapPosition, null);
@@ -583,7 +587,7 @@ public class MapView extends RelativeLayout {
+ " lat: " + mapPosition.lat
+ " lon: " + mapPosition.lon);
mMapViewPosition.setMapCenter(mapPosition);
redrawMap();
redrawMap(true);
}
/**