string format fix

This commit is contained in:
MadWasp79 2020-05-01 16:19:46 +03:00
parent 7dceb8e670
commit 9ec38f6341
2 changed files with 7 additions and 0 deletions

View file

@ -211,6 +211,10 @@ public abstract class MapObject implements Comparable<MapObject> {
location = new LatLon(latitude, longitude);
}
public void setLocation(LatLon loc) {
location = loc;
}
@Override
public int compareTo(MapObject o) {
return OsmAndCollator.primaryCollator().compare(getName(), o.getName());

View file

@ -467,6 +467,9 @@ public class OpenstreetmapRemoteUtil implements OpenstreetmapUtil {
if (entity != null) {
if (!isWay && entity instanceof Node) {
// check whether this is node (because id of node could be the same as relation)
if (object instanceof NativeLibrary.RenderedObject && object.getLocation() == null) {
object.setLocation(((NativeLibrary.RenderedObject) object).getLabelLatLon());
}
if (MapUtils.getDistance(entity.getLatLon(), object.getLocation()) < 50) {
if (object instanceof Amenity) {
return replaceEditOsmTags((Amenity) object, entity);