Update rendering style
This commit is contained in:
parent
51bfe93282
commit
7c124baaf9
3 changed files with 9 additions and 9 deletions
|
@ -35,17 +35,14 @@ public class DiscountHelper {
|
|||
|
||||
|
||||
public static void checkAndDisplay(final MapActivity mapActivity) {
|
||||
|
||||
if (mBannerVisible) {
|
||||
showDiscountBanner(mapActivity, mTitle, mDescription, mIcon, mUrl);
|
||||
}
|
||||
|
||||
if (System.currentTimeMillis() - mLastCheckTime < 1000 * 60 * 60 * 24
|
||||
|| !mapActivity.getMyApplication().getSettings().isInternetConnectionAvailable()) {
|
||||
return;
|
||||
}
|
||||
mLastCheckTime = System.currentTimeMillis();
|
||||
|
||||
new AsyncTask<Void, Void, String>() {
|
||||
|
||||
@Override
|
||||
|
@ -54,7 +51,6 @@ public class DiscountHelper {
|
|||
String res = AndroidNetworkUtils.sendRequest(mapActivity.getMyApplication(),
|
||||
"http://osmand.net/api/motd", null, "Requesting discount info...", false);
|
||||
return res;
|
||||
|
||||
} catch (Exception e) {
|
||||
logError("Requesting discount info error: ", e);
|
||||
return null;
|
||||
|
|
|
@ -784,7 +784,7 @@ public class MapRenderRepositories {
|
|||
if (checkWhetherInterrupted()) {
|
||||
// revert if it was interrupted
|
||||
// (be smart a bit do not revert if road already drawn)
|
||||
if(currentRenderingContext.lastRenderedKey < 35) {
|
||||
if(currentRenderingContext.lastRenderedKey < OsmandRenderer.DEFAULT_LINE_MAX) {
|
||||
reuse = this.bmp;
|
||||
this.bmp = this.prevBmp;
|
||||
this.bmpLocation = this.prevBmpLocation;
|
||||
|
|
|
@ -59,6 +59,10 @@ public class OsmandRenderer {
|
|||
private Paint paint;
|
||||
|
||||
private Paint paintIcon;
|
||||
public static final int DEFAULT_POLYGON_MAX = 11;
|
||||
public static final int DEFAULT_LINE_MAX = 100;
|
||||
public static final int DEFAULT_POINTS_MAX = 200;
|
||||
|
||||
|
||||
public static final int TILE_SIZE = 256;
|
||||
private static final int MAX_V = 75;
|
||||
|
@ -260,16 +264,16 @@ public class OsmandRenderer {
|
|||
rc.lastRenderedKey = 0;
|
||||
|
||||
drawObject(rc, cv, render, polygonsArray, 0);
|
||||
rc.lastRenderedKey = 5;
|
||||
rc.lastRenderedKey = DEFAULT_POLYGON_MAX;
|
||||
if (rc.shadowRenderingMode > 1) {
|
||||
drawObject(rc, cv, render, linesArray, 1);
|
||||
}
|
||||
rc.lastRenderedKey = 40;
|
||||
rc.lastRenderedKey = (DEFAULT_LINE_MAX + DEFAULT_POLYGON_MAX) / 2;
|
||||
drawObject(rc, cv, render, linesArray, 2);
|
||||
rc.lastRenderedKey = 60;
|
||||
rc.lastRenderedKey = DEFAULT_LINE_MAX;
|
||||
|
||||
drawObject(rc, cv, render, pointsArray, 3);
|
||||
rc.lastRenderedKey = 125;
|
||||
rc.lastRenderedKey = DEFAULT_POINTS_MAX;
|
||||
|
||||
|
||||
long beforeIconTextTime = System.currentTimeMillis() - now;
|
||||
|
|
Loading…
Reference in a new issue