Skip to content

Commit f573a83

Browse files
fix panning to chase cars
1 parent 568b142 commit f573a83

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

js/mobile.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/tracker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ function unload() {
7171
}
7272

7373
function panTo(vehicle_index) {
74-
map.panTo(vehicles[vehicle_index].marker_shadow.getPosition());
74+
if(vehicles[vehicle_index].marker_shadow) map.panTo(vehicles[vehicle_index].marker_shadow.getPosition());
75+
else map.panTo(vehicles[vehicle_index].marker.getPosition());
7576
}
7677

7778
function optional(caption, value, postfix) {

0 commit comments

Comments
 (0)