Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
7627f97eb7
6 changed files with 19 additions and 14 deletions
|
@ -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
|
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="wiki_around">Nearby Wikipedia articles</string>
|
||||||
<string name="search_map_hint">Search city or region</string>
|
<string name="search_map_hint">Search city or region</string>
|
||||||
<string name="route_roundabout_short">Take %1$d exit and go</string>
|
<string name="route_roundabout_short">Take %1$d exit and go</string>
|
||||||
|
|
|
@ -60,8 +60,7 @@ public class LocalIndexInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Special domain object represents category
|
// Special domain object represents category
|
||||||
public LocalIndexInfo(@NonNull LocalIndexType type, boolean backup, @NonNull String subfolder,
|
public LocalIndexInfo(@NonNull LocalIndexType type, boolean backup, @NonNull String subfolder) {
|
||||||
@NonNull OsmandApplication app) {
|
|
||||||
this.type = type;
|
this.type = type;
|
||||||
backupedData = backup;
|
backupedData = backup;
|
||||||
this.subfolder = subfolder;
|
this.subfolder = subfolder;
|
||||||
|
|
|
@ -342,7 +342,9 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void loadFile(LocalIndexInfo... loaded) {
|
public void loadFile(LocalIndexInfo... loaded) {
|
||||||
publishProgress(loaded);
|
if (!isCancelled()) {
|
||||||
|
publishProgress(loaded);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -853,8 +855,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LocalIndexInfo newCat = new LocalIndexInfo(val.getType(), backuped, val.getSubfolder(),
|
LocalIndexInfo newCat = new LocalIndexInfo(val.getType(), backuped, val.getSubfolder());
|
||||||
getMyApplication());
|
|
||||||
category.add(newCat);
|
category.add(newCat);
|
||||||
data.put(newCat, new ArrayList<LocalIndexInfo>());
|
data.put(newCat, new ArrayList<LocalIndexInfo>());
|
||||||
return newCat;
|
return newCat;
|
||||||
|
@ -931,8 +932,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment implement
|
||||||
}
|
}
|
||||||
if (found == -1) {
|
if (found == -1) {
|
||||||
found = category.size();
|
found = category.size();
|
||||||
category.add(new LocalIndexInfo(info.getType(), info.isBackupedData(),
|
category.add(new LocalIndexInfo(info.getType(), info.isBackupedData(), info.getSubfolder()));
|
||||||
info.getSubfolder(), getMyApplication()));
|
|
||||||
}
|
}
|
||||||
if (!data.containsKey(category.get(found))) {
|
if (!data.containsKey(category.get(found))) {
|
||||||
data.put(category.get(found), new ArrayList<LocalIndexInfo>());
|
data.put(category.get(found), new ArrayList<LocalIndexInfo>());
|
||||||
|
|
|
@ -34,6 +34,7 @@ public class RendererRegistry {
|
||||||
public final static String WINTER_SKI_RENDER = "Winter and ski"; //$NON-NLS-1$
|
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 NAUTICAL_RENDER = "Nautical"; //$NON-NLS-1$
|
||||||
public final static String TOPO_RENDER = "Topo"; //$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 defaultRender = null;
|
||||||
private RenderingRulesStorage currentSelectedRender = null;
|
private RenderingRulesStorage currentSelectedRender = null;
|
||||||
|
@ -61,6 +62,7 @@ public class RendererRegistry {
|
||||||
internalRenderers.put(NAUTICAL_RENDER, "nautical" + ".render.xml");
|
internalRenderers.put(NAUTICAL_RENDER, "nautical" + ".render.xml");
|
||||||
internalRenderers.put(WINTER_SKI_RENDER, "skimap" + ".render.xml");
|
internalRenderers.put(WINTER_SKI_RENDER, "skimap" + ".render.xml");
|
||||||
internalRenderers.put(TOPO_RENDER, "topo" + ".render.xml");
|
internalRenderers.put(TOPO_RENDER, "topo" + ".render.xml");
|
||||||
|
internalRenderers.put(CITYVIEW_RENDER, "cityview" + ".render.xml");
|
||||||
}
|
}
|
||||||
|
|
||||||
public RenderingRulesStorage defaultRender() {
|
public RenderingRulesStorage defaultRender() {
|
||||||
|
|
|
@ -169,11 +169,13 @@ public class ImpassableRoadsLayer extends OsmandMapLayer implements
|
||||||
|
|
||||||
for (RouteDataObject road : getMissingRoads()) {
|
for (RouteDataObject road : getMissingRoads()) {
|
||||||
Location location = getMissingRoadLocations().get(road.getId());
|
Location location = getMissingRoadLocations().get(road.getId());
|
||||||
int x = (int) tileBox.getPixXFromLatLon(location.getLatitude(), location.getLongitude());
|
if (location != null) {
|
||||||
int y = (int) tileBox.getPixYFromLatLon(location.getLatitude(), location.getLongitude());
|
int x = (int) tileBox.getPixXFromLatLon(location.getLatitude(), location.getLongitude());
|
||||||
if (calculateBelongs(ex, ey, x, y, compare)) {
|
int y = (int) tileBox.getPixYFromLatLon(location.getLatitude(), location.getLongitude());
|
||||||
compare = radius;
|
if (calculateBelongs(ex, ey, x, y, compare)) {
|
||||||
o.add(road);
|
compare = radius;
|
||||||
|
o.add(road);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -439,8 +439,9 @@ public class MainActivity extends AppCompatActivity {
|
||||||
public void onLongPress(MotionEvent e) {
|
public void onLongPress(MotionEvent e) {
|
||||||
PointI point31 = new PointI();
|
PointI point31 = new PointI();
|
||||||
mapView.getLocationFromScreenPoint(new PointI((int) e.getX(), (int) e.getY()), point31);
|
mapView.getLocationFromScreenPoint(new PointI((int) e.getX(), (int) e.getY()), point31);
|
||||||
// geocode(point31);
|
net.osmand.core.jni.LatLon jniLatLon = Utilities.convert31ToLatLon(point31);
|
||||||
//Toast.makeText(MainActivity.this, "Geocoding...", Toast.LENGTH_SHORT).show();
|
menu.show(new LatLon(jniLatLon.getLatitude(), jniLatLon.getLongitude()),
|
||||||
|
new PointDescription(jniLatLon.getLatitude(), jniLatLon.getLongitude()), null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue