Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2014-07-12 01:52:25 +02:00
commit 1bc833f096
5 changed files with 21 additions and 13 deletions

3
OsmAnd/.gitignore vendored
View file

@ -11,4 +11,5 @@ jni/Local.mk
out/ out/
use/ use/
osmand.properties osmand.properties
osmand.xml osmand.xml
src/help

View file

@ -34,6 +34,12 @@
<include name="*.xml"/> <include name="*.xml"/>
</fileset> </fileset>
</copy> </copy>
<copy todir="${src.absolute.dir}/help/">
<fileset dir="../../help/" >
<include name="*.html"/>
<include name="screens/**/*.png"/>
</fileset>
</copy>
<copy todir="${src.absolute.dir}/net/osmand/render/"> <copy todir="${src.absolute.dir}/net/osmand/render/">
<fileset dir="../../resources/rendering_styles/" > <fileset dir="../../resources/rendering_styles/" >
<include name="*.xml"/> <include name="*.xml"/>

View file

@ -170,7 +170,7 @@ public class OsMoPlugin extends OsmandPlugin implements MonitoringInfoControlSer
MapInfoLayer layer = activity.getMapLayers().getMapInfoLayer(); MapInfoLayer layer = activity.getMapLayers().getMapInfoLayer();
osmoControl = createOsMoControl(activity, layer.getPaintText(), layer.getPaintSubText()); osmoControl = createOsMoControl(activity, layer.getPaintText(), layer.getPaintSubText());
layer.getMapInfoControls().registerSideWidget(osmoControl, layer.getMapInfoControls().registerSideWidget(osmoControl,
R.drawable.mon_osmo_conn_big, R.string.osmo_control, "osmo_control", false, 18); R.drawable.mon_osmo_signal_inactive, R.string.osmo_control, "osmo_control", false, 18);
layer.recreateControls(); layer.recreateControls();
if(olayer != null) { if(olayer != null) {

View file

@ -117,22 +117,22 @@ public class OsMoPositionLayer extends OsmandMapLayer implements ContextMenuLaye
} }
@Override @Override
public void onDraw(Canvas canvas, RotatedTileBox tb, DrawSettings nightMode) { public void onDraw(Canvas canvas, RotatedTileBox tileBox, DrawSettings nightMode) {
final int r = getRadiusPoi(tb); final int r = getRadiusPoi(tileBox);
long treshold = System.currentTimeMillis() - 15000; long treshold = System.currentTimeMillis() - 15000;
for (OsMoDevice t : getTrackingDevices()) { for (OsMoDevice t : getTrackingDevices()) {
Location l = t.getLastLocation(); Location l = t.getLastLocation();
ConcurrentLinkedQueue<Location> plocations = t.getPreviousLocations(treshold); ConcurrentLinkedQueue<Location> plocations = t.getPreviousLocations(treshold);
if (!plocations.isEmpty() && l != null) { if (!plocations.isEmpty() && l != null) {
int x = (int) tb.getPixXFromLatLon(l.getLatitude(), l.getLongitude()); int x = (int) tileBox.getPixXFromLonNoRot(l.getLongitude());
int y = (int) tb.getPixYFromLatLon(l.getLatitude(), l.getLongitude()); int y = (int) tileBox.getPixYFromLatNoRot(l.getLatitude());
pth.rewind(); pth.rewind();
Iterator<Location> it = plocations.iterator(); Iterator<Location> it = plocations.iterator();
boolean f = true; boolean f = true;
while (it.hasNext()) { while (it.hasNext()) {
Location lo = it.next(); Location lo = it.next();
int xt = (int) tb.getPixXFromLatLon(lo.getLatitude(), lo.getLongitude()); int xt = (int) tileBox.getPixXFromLonNoRot(lo.getLongitude());
int yt = (int) tb.getPixYFromLatLon(lo.getLatitude(), lo.getLongitude()); int yt = (int) tileBox.getPixYFromLatNoRot(lo.getLatitude());
if (f) { if (f) {
f = false; f = false;
pth.moveTo(xt, yt); pth.moveTo(xt, yt);
@ -145,14 +145,15 @@ public class OsMoPositionLayer extends OsmandMapLayer implements ContextMenuLaye
canvas.drawPath(pth, paintPath); canvas.drawPath(pth, paintPath);
} }
} }
canvas.rotate(-tileBox.getRotate(), tileBox.getCenterPixelX(), tileBox.getCenterPixelY());
for (OsMoDevice t : getTrackingDevices()) { for (OsMoDevice t : getTrackingDevices()) {
Location l = t.getLastLocation(); Location l = t.getLastLocation();
if (l != null) { if (l != null) {
int x = (int) tb.getPixXFromLatLon(l.getLatitude(), l.getLongitude()); int x = (int) tileBox.getPixXFromLatLon(l.getLatitude(), l.getLongitude());
int y = (int) tb.getPixYFromLatLon(l.getLatitude(), l.getLongitude()); int y = (int) tileBox.getPixYFromLatLon(l.getLatitude(), l.getLongitude());
pointInnerCircle.setColor(t.getColor()); pointInnerCircle.setColor(t.getColor());
canvas.drawCircle(x, y, r + (float)Math.ceil(tb.getDensity()), pointOuter); canvas.drawCircle(x, y, r + (float)Math.ceil(tileBox.getDensity()), pointOuter);
canvas.drawCircle(x, y, r - (float)Math.ceil(tb.getDensity()), pointInnerCircle); canvas.drawCircle(x, y, r - (float)Math.ceil(tileBox.getDensity()), pointInnerCircle);
paintTextIcon.setTextSize(r * 3 / 2); paintTextIcon.setTextSize(r * 3 / 2);
canvas.drawText(t.getVisibleName().substring(0, 1).toUpperCase(), x, y + r / 2, paintTextIcon); canvas.drawText(t.getVisibleName().substring(0, 1).toUpperCase(), x, y + r / 2, paintTextIcon);
} }

View file

@ -107,7 +107,7 @@ public class AppearanceWidgetsFactory {
visibleNames[j] = Algorithms.capitalizeFirstLetterAndLowercase(items[j].replace('_', ' ').replace( visibleNames[j] = Algorithms.capitalizeFirstLetterAndLowercase(items[j].replace('_', ' ').replace(
'-', ' ')); '-', ' '));
} }
bld.setSingleChoiceItems(items, selected, new DialogInterface.OnClickListener() { bld.setSingleChoiceItems(visibleNames, selected, new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {