diff --git a/html/planeObject.js b/html/planeObject.js index 9460b85..b0e12f6 100644 --- a/html/planeObject.js +++ b/html/planeObject.js @@ -1450,8 +1450,11 @@ PlaneObject.prototype.updateFeatures = function(now, last, redraw) { if (lines) this.updateLines(); - if (marker) + if (marker) { this.updateMarker(true); + if (this == SelectedPlane && FollowSelected && this.position) + OLMap.getView().setCenter(ol.proj.fromLonLat(this.position)); + } } else { if (this.visible) { //console.log("hiding " + this.icao); diff --git a/html/script.js b/html/script.js index 608b3bc..d427d22 100644 --- a/html/script.js +++ b/html/script.js @@ -1164,7 +1164,7 @@ function parse_history() { changeCenter("init"); if (globeIndex) - setInterval(checkMovement, 100); + setInterval(checkMovement, 50); else setInterval(checkMovement, 30); @@ -3476,8 +3476,6 @@ function changeCenter(init) { if (!onlySelected) refreshTableInfo(); - checkFollow(); - if (!init && showTrace) updateAddressBar(); } @@ -3494,6 +3492,9 @@ function checkMovement() { noMovement = 0; } + if (noMovement == 0) + checkFollow(); + checkMoveZoom = zoom; checkMoveCenter[0] = center[0]; checkMoveCenter[1] = center[1];