Skip to content

Commit a9dc616

Browse files
committed
fix polyline tracking for plot
1 parent 5b59bf8 commit a9dc616

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

js/plot_config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,11 @@ function updateLegend(pos) {
7777

7878
if(outside && pij !== undefined) {
7979
if(!polyMarker) {
80-
try {polyMarker = new L.Marker(vehicles[follow_vehicle].prediction_polyline.getLatLngs()[pij]).addTo(map);} catch (e) {};
80+
try {polyMarker = new L.Marker(vehicles[follow_vehicle].prediction_polyline[0].getLatLngs()[pij]).addTo(map);} catch (e) {};
81+
try {polyMarker = new L.Marker(vehicles[follow_vehicle].prediction_polyline[1].getLatLngs()[pij]).addTo(map);} catch (e) {};
8182
} else {
82-
try {polyMarker.setLatLng(vehicles[follow_vehicle].prediction_polyline.getLatLngs()[pij]);} catch (e) {};
83+
try {polyMarker.setLatLng(vehicles[follow_vehicle].prediction_polyline[0].getLatLngs()[pij]);} catch (e) {};
84+
try {polyMarker.setLatLng(vehicles[follow_vehicle].prediction_polyline[1].getLatLngs()[pij]);} catch (e) {};
8385
}
8486

8587
}

0 commit comments

Comments
 (0)