Skip to content

Commit 4ca005c

Browse files
committed
hide predictions with path
1 parent 61353d9 commit 4ca005c

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

js/tracker.js

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,6 @@ if (maplayer !== null) {
331331
}
332332
}
333333

334-
console.log(selectedLayer);
335-
336334
// mousemove event throttle hack for smoother maps pan on firefox and IE
337335
// taken from: http://stackoverflow.com/questions/22306130/how-to-limit-google-maps-api-lag-when-panning-the-map-with-lots-of-markers-and-p
338336

@@ -1674,6 +1672,35 @@ function set_polyline_visibility(vcallsign, val) {
16741672
}
16751673
}
16761674

1675+
if(vehicle.prediction_polyline) {
1676+
if (val) {
1677+
map.addLayer(vehicle.prediction_polyline);
1678+
} else {
1679+
map.removeLayer(vehicle.prediction_polyline);
1680+
}
1681+
}
1682+
if(vehicle.prediction_launch_polyline) {
1683+
if (val) {
1684+
map.addLayer(vehicle.prediction_launch_polyline);
1685+
} else {
1686+
map.removeLayer(vehicle.prediction_launch_polyline);
1687+
}
1688+
}
1689+
if(vehicle.prediction_target) {
1690+
if (val) {
1691+
map.addLayer(vehicle.prediction_target);
1692+
} else {
1693+
map.removeLayer(vehicle.prediction_target);
1694+
}
1695+
}
1696+
if(vehicle.prediction_burst) {
1697+
if (val) {
1698+
map.addLayer(vehicle.prediction_burst);
1699+
} else {
1700+
map.removeLayer(vehicle.prediction_burst);
1701+
}
1702+
}
1703+
16771704
map.removeLayer(mapInfoBox);
16781705
}
16791706

0 commit comments

Comments
 (0)