Remove basemap obf (todo add dialog to suggest to download it). Add icon for destination.
This commit is contained in:
parent
37cb569327
commit
1434244d3a
7 changed files with 29 additions and 35 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assets>
|
||||
<asset name="basemap.obf.jpg" destination="basemap.obf"/>
|
||||
<!-- <asset name="basemap.obf.jpg" destination="world_basemap.obf"/> -->
|
||||
<asset name="voice/en-tts/ttsconfig.p.jpg" destination="voice/en-tts/_ttsconfig.p"/>
|
||||
</assets>
|
BIN
OsmAnd/res/drawable-hdpi/arrow_to_destination.png
Normal file
BIN
OsmAnd/res/drawable-hdpi/arrow_to_destination.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.1 KiB |
BIN
OsmAnd/res/drawable/arrow_to_destination.png
Normal file
BIN
OsmAnd/res/drawable/arrow_to_destination.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -133,9 +133,7 @@ public class MainMenuActivity extends Activity {
|
|||
|
||||
// only one commit should be with contribution version flag
|
||||
// prefs.edit().putBoolean(CONTRIBUTION_VERSION_FLAG, true).commit();
|
||||
final TextView appName = (TextView) window.findViewById(R.id.AppName);
|
||||
if (prefs.contains(CONTRIBUTION_VERSION_FLAG)) {
|
||||
// appName.setText("OsmAnd");
|
||||
SpannableString content = new SpannableString(textVersion);
|
||||
content.setSpan(new ClickableSpan() {
|
||||
|
||||
|
@ -148,18 +146,6 @@ public class MainMenuActivity extends Activity {
|
|||
textVersionView.setText(content);
|
||||
textVersionView.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
}
|
||||
// SpannableString appLink = new SpannableString(appName.getText());
|
||||
// appLink.setSpan(new ClickableSpan() {
|
||||
//
|
||||
// @Override
|
||||
// public void onClick(View widget) {
|
||||
// TipsAndTricksActivity tactivity = new TipsAndTricksActivity(activity);
|
||||
// Dialog dlg = tactivity.getDialogToShowTips(false, true);
|
||||
// dlg.show();
|
||||
// }
|
||||
// }, appLink.length() - 1, appLink.length(), 0);
|
||||
// appName.setText(appLink);
|
||||
// appName.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
View helpButton = window.findViewById(R.id.HelpButton);
|
||||
helpButton.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
|
@ -293,11 +279,25 @@ public class MainMenuActivity extends Activity {
|
|||
TipsAndTricksActivity tipsActivity = new TipsAndTricksActivity(this);
|
||||
Dialog dlg = tipsActivity.getDialogToShowTips(!appVersionChanged, false);
|
||||
dlg.show();
|
||||
} else {
|
||||
startProgressDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||
@Override
|
||||
public void onDismiss(DialogInterface dialog) {
|
||||
checkVectorIndexesDownloaded();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
checkPreviousRunsForExceptions(firstTime);
|
||||
}
|
||||
|
||||
protected void checkVectorIndexesDownloaded() {
|
||||
ResourceManager resourceManager = ((OsmandApplication) getApplication()).getResourceManager();
|
||||
// resourceManager.getRenderer().get
|
||||
// TODO show dialog with problems
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Dialog onCreateDialog(int id) {
|
||||
if(id == OsmandApplication.PROGRESS_DIALOG){
|
||||
|
|
|
@ -7,7 +7,6 @@ import android.graphics.Bitmap;
|
|||
import android.graphics.BitmapFactory;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Matrix;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Path;
|
||||
import android.graphics.PointF;
|
||||
|
@ -26,10 +25,11 @@ public class PointNavigationLayer implements OsmandMapLayer {
|
|||
|
||||
protected LatLon pointToNavigate = null;
|
||||
private OsmandMapTileView view;
|
||||
private Path pathForDirection;
|
||||
private float[] calculations = new float[2];
|
||||
|
||||
private DisplayMetrics dm;
|
||||
private Bitmap targetPoint;
|
||||
private Bitmap arrowToDestination;
|
||||
|
||||
|
||||
|
||||
|
@ -41,9 +41,12 @@ public class PointNavigationLayer implements OsmandMapLayer {
|
|||
point.setStyle(Style.FILL);
|
||||
|
||||
bitmapPaint = new Paint();
|
||||
bitmapPaint.setDither(true);
|
||||
bitmapPaint.setAntiAlias(true);
|
||||
bitmapPaint.setFilterBitmap(true);
|
||||
targetPoint = BitmapFactory.decodeResource(view.getResources(), R.drawable.target_point);
|
||||
arrowToDestination = BitmapFactory.decodeResource(view.getResources(), R.drawable.arrow_to_destination);
|
||||
|
||||
pathForDirection = new Path();
|
||||
|
||||
}
|
||||
|
||||
|
@ -72,21 +75,12 @@ public class PointNavigationLayer implements OsmandMapLayer {
|
|||
} else {
|
||||
Location.distanceBetween(view.getLatitude(), view.getLongitude(), pointToNavigate.getLatitude(),
|
||||
pointToNavigate.getLongitude(), calculations);
|
||||
float bearing = calculations[1];
|
||||
pathForDirection.reset();
|
||||
pathForDirection.moveTo(0, 0);
|
||||
pathForDirection.lineTo(0.5f, 1.5f);
|
||||
pathForDirection.lineTo(-0.5f, 1.5f);
|
||||
pathForDirection.lineTo(0, 0);
|
||||
float radiusBearing = DIST_TO_SHOW;
|
||||
Matrix m = new Matrix();
|
||||
m.reset();
|
||||
m.postScale(RADIUS * dm.density * 2, RADIUS * 2 * dm.density);
|
||||
m.postTranslate(0, - radiusBearing * dm.density );
|
||||
m.postTranslate(view.getCenterPointX(), view.getCenterPointY());
|
||||
m.postRotate(bearing, view.getCenterPointX(), view.getCenterPointY());
|
||||
pathForDirection.transform(m);
|
||||
canvas.drawPath(pathForDirection, point);
|
||||
float bearing = calculations[1] - 90;
|
||||
float radiusBearing = DIST_TO_SHOW * dm.density;
|
||||
canvas.rotate(bearing - view.getRotate(), view.getCenterPointX(), view.getCenterPointY());
|
||||
canvas.translate(-24 * dm.density + radiusBearing, -22 * dm.density);
|
||||
canvas.drawBitmap(arrowToDestination, view.getCenterPointX(), view.getCenterPointY(), bitmapPaint);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue