+ this._earthControlsSubscription = this._configuration$.pipe(operators_1.map(function (configuration) {
+ return configuration.earthControls;
+ }), operators_1.distinctUntilChanged(), operators_1.withLatestFrom(this._navigator.stateService.state$))
+ .subscribe(function (_a) {
+ var earth = _a[0], state = _a[1];
+ if (earth && state !== State_1.default.Earth) {
+ _this._navigator.stateService.earth();
+ }
+ else if (!earth && state === State_1.default.Earth) {
+ _this._navigator.stateService.traverse();
+ }
+ });