Fix gpx layer
Conflicts: OsmAnd/res/values/strings.xml
This commit is contained in:
parent
2bb7f051a2
commit
e90c2ea5f7
3 changed files with 8 additions and 9 deletions
|
@ -9,6 +9,10 @@
|
||||||
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
|
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
|
||||||
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
||||||
-->
|
-->
|
||||||
|
<string name="light_theme">Light</string>
|
||||||
|
<string name="dark_theme">Dark</string>
|
||||||
|
<string name="lang_es_ar">Argentinean Spanish</string>
|
||||||
|
<string name="lang_nb">Norwegian Bokmål</string>
|
||||||
<string name="lang_vo">Volapuk</string>
|
<string name="lang_vo">Volapuk</string>
|
||||||
<string name="lang_th">Thai</string>
|
<string name="lang_th">Thai</string>
|
||||||
<string name="lang_te">Telugu</string>
|
<string name="lang_te">Telugu</string>
|
||||||
|
|
|
@ -382,7 +382,7 @@ public class SettingsGeneralActivity extends SettingsBaseActivity {
|
||||||
|
|
||||||
registerListPreference(
|
registerListPreference(
|
||||||
settings.OSMAND_THEME, misc,
|
settings.OSMAND_THEME, misc,
|
||||||
new String[] { "Dark", "Light" }, new Integer[] { OsmandSettings.OSMAND_DARK_THEME,
|
new String[] { getString(R.string.dark_theme), getString(R.string.light_theme) }, new Integer[] { OsmandSettings.OSMAND_DARK_THEME,
|
||||||
OsmandSettings.OSMAND_LIGHT_THEME});
|
OsmandSettings.OSMAND_LIGHT_THEME});
|
||||||
|
|
||||||
misc.addPreference(createCheckBoxPreference(settings.USE_KALMAN_FILTER_FOR_COMPASS, R.string.use_kalman_filter_compass, R.string.use_kalman_filter_compass_descr));
|
misc.addPreference(createCheckBoxPreference(settings.USE_KALMAN_FILTER_FOR_COMPASS, R.string.use_kalman_filter_compass, R.string.use_kalman_filter_compass_descr));
|
||||||
|
|
|
@ -303,7 +303,7 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
|
||||||
int startIndex = -1;
|
int startIndex = -1;
|
||||||
int endIndex = -1;
|
int endIndex = -1;
|
||||||
int prevCross = 0;
|
int prevCross = 0;
|
||||||
double shift = 0.1;
|
double shift = 0;
|
||||||
for (int i = 0; i < l.points.size(); i++) {
|
for (int i = 0; i < l.points.size(); i++) {
|
||||||
WptPt ls = l.points.get(i);
|
WptPt ls = l.points.get(i);
|
||||||
int cross = 0;
|
int cross = 0;
|
||||||
|
@ -313,21 +313,16 @@ public class GPXLayer extends OsmandMapLayer implements ContextMenuLayer.IContex
|
||||||
cross |= (ls.lat < latLonBounds.bottom - shift ? 8 : 0);
|
cross |= (ls.lat < latLonBounds.bottom - shift ? 8 : 0);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
if ((prevCross & cross) == 0) {
|
if ((prevCross & cross) == 0) {
|
||||||
if(prevCross == 0 && endIndex != -1) {
|
if (endIndex == i - 1 && startIndex != -1) {
|
||||||
// continue previous line
|
// continue previous line
|
||||||
} else {
|
} else {
|
||||||
// start new segment
|
// start new segment
|
||||||
if (startIndex > 0) {
|
if (startIndex >= 0) {
|
||||||
drawSegment(canvas, tileBox, l, startIndex, endIndex);
|
drawSegment(canvas, tileBox, l, startIndex, endIndex);
|
||||||
}
|
}
|
||||||
startIndex = i - 1;
|
startIndex = i - 1;
|
||||||
}
|
}
|
||||||
endIndex = i;
|
endIndex = i;
|
||||||
} else {
|
|
||||||
if (startIndex != -1) {
|
|
||||||
drawSegment(canvas, tileBox, l, startIndex, endIndex);
|
|
||||||
startIndex = -1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
prevCross = cross;
|
prevCross = cross;
|
||||||
|
|
Loading…
Reference in a new issue