OsmAnd/OsmAnd-java/src/main/java/net/osmand/data/TransportStopExit.java

37 lines
823 B
Java
Raw Normal View History

2018-12-19 08:46:47 +01:00
package net.osmand.data;
2019-03-04 12:29:26 +01:00
import net.osmand.util.Algorithms;
2018-12-19 08:46:47 +01:00
import net.osmand.util.MapUtils;
public class TransportStopExit extends MapObject {
public int x31;
public int y31;
2018-12-19 13:56:38 +01:00
public String ref = null;
2019-03-04 12:29:26 +01:00
2018-12-19 08:46:47 +01:00
@Override
public void setLocation(double latitude, double longitude) {
super.setLocation(latitude, longitude);
}
2019-03-04 12:29:26 +01:00
2018-12-19 08:46:47 +01:00
public void setLocation(int zoom, int dx, int dy) {
x31 = dx << (31 - zoom);
y31 = dy << (31 - zoom);
setLocation(MapUtils.getLatitudeFromTile(zoom, dy), MapUtils.getLongitudeFromTile(zoom, dx));
}
2019-03-04 12:29:26 +01:00
public void setRef(String ref) {
2018-12-19 13:56:38 +01:00
this.ref = ref;
}
2019-03-04 12:29:26 +01:00
2018-12-19 13:56:38 +01:00
public String getRef() {
if (ref != null) {
return ref;
}
return "";
}
2019-03-04 12:29:26 +01:00
public boolean compareExit(TransportStopExit thatObj) {
return this.compareObject(thatObj) && Algorithms.objectEquals(this.ref, thatObj.ref);
}
2018-12-19 08:46:47 +01:00
}