Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2016-11-18 18:23:06 +01:00
commit 7627f97eb7
6 changed files with 19 additions and 14 deletions

View file

@ -10,6 +10,7 @@
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="upload_osm_note_description">You can upload your OSM Note anonymously if you use your OpenStreetMap.org profile.</string>
<string name="wiki_around">Nearby Wikipedia articles</string>
<string name="search_map_hint">Search city or region</string>
<string name="route_roundabout_short">Take %1$d exit and go</string>

View file

@ -60,8 +60,7 @@ public class LocalIndexInfo {
}
// Special domain object represents category
public LocalIndexInfo(@NonNull LocalIndexType type, boolean backup, @NonNull String subfolder,
@NonNull OsmandApplication app) {
public LocalIndexInfo(@NonNull LocalIndexType type, boolean backup, @NonNull String subfolder) {
this.type = type;
backupedData = backup;
this.subfolder = subfolder;

View file

@ -342,7 +342,9 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
@Override
public void loadFile(LocalIndexInfo... loaded) {
publishProgress(loaded);
if (!isCancelled()) {
publishProgress(loaded);
}
}
@Override
@ -853,8 +855,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
return i;
}
}
LocalIndexInfo newCat = new LocalIndexInfo(val.getType(), backuped, val.getSubfolder(),
getMyApplication());
LocalIndexInfo newCat = new LocalIndexInfo(val.getType(), backuped, val.getSubfolder());
category.add(newCat);
data.put(newCat, new ArrayList<LocalIndexInfo>());
return newCat;
@ -931,8 +932,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
}
if (found == -1) {
found = category.size();
category.add(new LocalIndexInfo(info.getType(), info.isBackupedData(),
info.getSubfolder(), getMyApplication()));
category.add(new LocalIndexInfo(info.getType(), info.isBackupedData(), info.getSubfolder()));
}
if (!data.containsKey(category.get(found))) {
data.put(category.get(found), new ArrayList<LocalIndexInfo>());

View file

@ -34,6 +34,7 @@ public class RendererRegistry {
public final static String WINTER_SKI_RENDER = "Winter and ski"; //$NON-NLS-1$
public final static String NAUTICAL_RENDER = "Nautical"; //$NON-NLS-1$
public final static String TOPO_RENDER = "Topo"; //$NON-NLS-1$
public final static String CITYVIEW_RENDER = "City view"; //$NON-NLS-1$
private RenderingRulesStorage defaultRender = null;
private RenderingRulesStorage currentSelectedRender = null;
@ -61,6 +62,7 @@ public class RendererRegistry {
internalRenderers.put(NAUTICAL_RENDER, "nautical" + ".render.xml");
internalRenderers.put(WINTER_SKI_RENDER, "skimap" + ".render.xml");
internalRenderers.put(TOPO_RENDER, "topo" + ".render.xml");
internalRenderers.put(CITYVIEW_RENDER, "cityview" + ".render.xml");
}
public RenderingRulesStorage defaultRender() {

View file

@ -169,11 +169,13 @@ public class ImpassableRoadsLayer extends OsmandMapLayer implements
for (RouteDataObject road : getMissingRoads()) {
Location location = getMissingRoadLocations().get(road.getId());
int x = (int) tileBox.getPixXFromLatLon(location.getLatitude(), location.getLongitude());
int y = (int) tileBox.getPixYFromLatLon(location.getLatitude(), location.getLongitude());
if (calculateBelongs(ex, ey, x, y, compare)) {
compare = radius;
o.add(road);
if (location != null) {
int x = (int) tileBox.getPixXFromLatLon(location.getLatitude(), location.getLongitude());
int y = (int) tileBox.getPixYFromLatLon(location.getLatitude(), location.getLongitude());
if (calculateBelongs(ex, ey, x, y, compare)) {
compare = radius;
o.add(road);
}
}
}
}

View file

@ -439,8 +439,9 @@ public class MainActivity extends AppCompatActivity {
public void onLongPress(MotionEvent e) {
PointI point31 = new PointI();
mapView.getLocationFromScreenPoint(new PointI((int) e.getX(), (int) e.getY()), point31);
// geocode(point31);
//Toast.makeText(MainActivity.this, "Geocoding...", Toast.LENGTH_SHORT).show();
net.osmand.core.jni.LatLon jniLatLon = Utilities.convert31ToLatLon(point31);
menu.show(new LatLon(jniLatLon.getLatitude(), jniLatLon.getLongitude()),
new PointDescription(jniLatLon.getLatitude(), jniLatLon.getLongitude()), null);
}
@Override