Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
82e5ee817d
2 changed files with 6 additions and 4 deletions
|
@ -471,7 +471,8 @@ public class AmenityMenuBuilder extends MenuBuilder {
|
||||||
OsmandSettings st = ((OsmandApplication) mapActivity.getApplicationContext()).getSettings();
|
OsmandSettings st = ((OsmandApplication) mapActivity.getApplicationContext()).getSettings();
|
||||||
|
|
||||||
boolean osmEditingEnabled = OsmandPlugin.getEnabledPlugin(OsmEditingPlugin.class) != null;
|
boolean osmEditingEnabled = OsmandPlugin.getEnabledPlugin(OsmEditingPlugin.class) != null;
|
||||||
if (osmEditingEnabled) {
|
if (osmEditingEnabled && amenity.getId() != null
|
||||||
|
&& amenity.getId() > 0 && amenity.getId() < 1000000000) {
|
||||||
String link;
|
String link;
|
||||||
if (amenity.getId() % 2 == 0) {
|
if (amenity.getId() % 2 == 0) {
|
||||||
link = "http://www.openstreetmap.org/node/";
|
link = "http://www.openstreetmap.org/node/";
|
||||||
|
|
|
@ -82,16 +82,17 @@ public class RenderedObjectMenuController extends MenuController {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addPlainMenuItems(String typeStr, PointDescription pointDescription, final LatLon latLon) {
|
public void addPlainMenuItems(String typeStr, PointDescription pointDescription, final LatLon latLon) {
|
||||||
super.addPlainMenuItems(typeStr, pointDescription, latLon);
|
|
||||||
boolean osmEditingEnabled = OsmandPlugin.getEnabledPlugin(OsmEditingPlugin.class) != null;
|
boolean osmEditingEnabled = OsmandPlugin.getEnabledPlugin(OsmEditingPlugin.class) != null;
|
||||||
if (osmEditingEnabled) {
|
if (osmEditingEnabled && renderedObject.getId() != null
|
||||||
|
&& renderedObject.getId() > 0 && renderedObject.getId() < 1000000000) {
|
||||||
String link;
|
String link;
|
||||||
if ((renderedObject.getId() >> 6) % 2 == 0) {
|
if ((renderedObject.getId() >> 6) % 2 != 0) {
|
||||||
link = "http://www.openstreetmap.org/node/";
|
link = "http://www.openstreetmap.org/node/";
|
||||||
} else {
|
} else {
|
||||||
link = "http://www.openstreetmap.org/way/";
|
link = "http://www.openstreetmap.org/way/";
|
||||||
}
|
}
|
||||||
addPlainMenuItem(R.drawable.ic_action_info_dark, link + (renderedObject.getId() >> 7), true, true, null);
|
addPlainMenuItem(R.drawable.ic_action_info_dark, link + (renderedObject.getId() >> 7), true, true, null);
|
||||||
}
|
}
|
||||||
|
addMyLocationToPlainItems(latLon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue