Skip to content

Commit 3e7a773

Browse files
committed
/spt endpoint fix wrong var name
1 parent bc6260e commit 3e7a773

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

isochrone/src/main/java/com/graphhopper/isochrone/algorithm/Isochrone.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public void setDistanceLimit(double limit) {
107107
public static class IsoLabelWithCoordinates {
108108
public final int nodeId;
109109
public int edgeId, prevEdgeId, prevNodeId;
110-
public int timeInSec, prevTimeInSec;
110+
public int timeMillis, prevTimeMillis;
111111
public int distance, prevDistance;
112112
public GHPoint coordinate, prevCoordinate;
113113

@@ -132,7 +132,7 @@ public void apply(int nodeId, IsoLabel label) {
132132
double lon = na.getLongitude(nodeId);
133133
IsoLabelWithCoordinates isoLabelWC = new IsoLabelWithCoordinates(nodeId);
134134
isoLabelWC.coordinate = new GHPoint(lat, lon);
135-
isoLabelWC.timeInSec = Math.round(label.time);
135+
isoLabelWC.timeMillis = Math.round(label.time);
136136
isoLabelWC.distance = (int) Math.round(label.distance);
137137
isoLabelWC.edgeId = label.edge;
138138
if (label.parent != null) {
@@ -144,7 +144,7 @@ public void apply(int nodeId, IsoLabel label) {
144144
isoLabelWC.prevEdgeId = prevLabel.edge;
145145
isoLabelWC.prevCoordinate = new GHPoint(prevLat, prevLon);
146146
isoLabelWC.prevDistance = (int) Math.round(prevLabel.distance);
147-
isoLabelWC.prevTimeInSec = Math.round(prevLabel.time);
147+
isoLabelWC.prevTimeMillis = Math.round(prevLabel.time);
148148
}
149149
callback.add(isoLabelWC);
150150
}

web-bundle/src/main/java/com/graphhopper/resources/SPTResource.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ public Response doGet(
140140
sb.append(label.prevCoordinate == null ? 0 : label.prevDistance);
141141
continue;
142142
case "time":
143-
sb.append(label.timeInSec);
143+
sb.append(label.timeMillis);
144144
continue;
145145
case "prev_time":
146-
sb.append(label.prevCoordinate == null ? 0 : label.prevTimeInSec);
146+
sb.append(label.prevCoordinate == null ? 0 : label.prevTimeMillis);
147147
continue;
148148
case "longitude":
149149
sb.append(label.coordinate.lon);

0 commit comments

Comments
 (0)