Skip to content

Commit

Permalink
fix(cesium): Reflect terrainLayers rename
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacura committed Feb 26, 2024
1 parent c916716 commit 386b0b8
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion projects/cesium-test-app/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {TestBed, waitForAsync} from '@angular/core/testing';

import {HsCesiumConfig} from 'hslayers-cesium';
import {HsConfig} from 'hslayers-ng';
import {HsConfig} from 'hslayers-ng/config';

import {AppComponent} from './app.component';
class HsConfigMock {
Expand Down
3 changes: 2 additions & 1 deletion projects/cesium-test-app/src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';

import {AppComponent} from './app.component';
import {HsCesiumModule} from 'hslayers-cesium';
import {HslayersModule} from 'hslayers-ng';

import {AppComponent} from './app.component';

@NgModule({
declarations: [AppComponent],
imports: [BrowserModule, HslayersModule, HsCesiumModule],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import {BrowserModule} from '@angular/platform-browser';
import {FormsModule} from '@angular/forms';
import {HttpClientModule} from '@angular/common/http';
import {NgModule} from '@angular/core';

/* import {
Expand All @@ -8,10 +10,9 @@ import {NgModule} from '@angular/core';
} from 'hslayers-ng/public-api'; */
//import {HsMeasureModule} from 'hslayers-ng/components/measure/public-api';
//import {HsDrawModule} from 'hslayers-ng/components/draw/public-api';
import {FormsModule} from '@angular/forms';
import {HslayersAppComponent} from './hslayers-app.component';
import {HslayersModule} from 'hslayers-ng';
import {HttpClientModule} from '@angular/common/http';

import {HslayersAppComponent} from './hslayers-app.component';

@NgModule({
declarations: [HslayersAppComponent],
Expand Down
4 changes: 2 additions & 2 deletions projects/hslayers-cesium-app/src/app/app.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {TestBed, waitForAsync} from '@angular/core/testing';

import {HsCesiumConfig} from 'hslayers-cesium';
import {HsConfig} from 'hslayers-ng';
import {HsConfigMock} from 'hslayers-ng/config.service.mock';
import {HsConfig} from 'hslayers-ng/config';
import {HsConfigMock} from 'hslayers-ng/src/testing/config.service.mock';

import {AppComponent} from './app.component';
class HsCesiumConfigMock {
Expand Down
4 changes: 3 additions & 1 deletion projects/hslayers-cesium-app/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ export class AppModule implements DoBootstrap {
return;
}
const apps: HTMLElement[] = Array.from(
document.querySelectorAll('hslayers-cesium-app')
document.querySelectorAll(
'hslayers-cesium-app',
) as NodeListOf<HTMLElement>,
);
for (const el of apps) {
if (!el.dataset.init) {
Expand Down
3 changes: 2 additions & 1 deletion projects/hslayers-cesium/src/hscesium-camera.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ import {
} from 'cesium';
import {get as getProj, transformExtent} from 'ol/proj';

import {HsCesiumConfig} from './hscesium-config.service';
import {HsConfig} from 'hslayers-ng/config';
import {HsLogService} from 'hslayers-ng/shared/log';
import {HsMapService} from 'hslayers-ng/shared/map';

import {HsCesiumConfig} from './hscesium-config.service';

export class CesiumCameraServiceParams {
viewer: Viewer;
lastGoodCenter: any[] = null;
Expand Down
5 changes: 3 additions & 2 deletions projects/hslayers-cesium/src/hscesium.component.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import {AfterViewInit, Component} from '@angular/core';

import {HS_PRMS, HsShareUrlService} from 'hslayers-ng/components/share';
import {HsCesiumService} from './hscesium.service';
import {HsCoreService} from 'hslayers-ng/shared/core';
import {HsEventBusService} from 'hslayers-ng/shared/event-bus';
import {HsLayoutService} from 'hslayers-ng/shared/layout';
import {HsMapService} from 'hslayers-ng/shared/map';
import {HsSidebarService} from 'hslayers-ng/shared/sidebar';

import {HsCesiumService} from './hscesium.service';

@Component({
selector: 'hs-cesium',
templateUrl: './hscesium.html',
Expand All @@ -27,7 +28,7 @@ export class HslayersCesiumComponent implements AfterViewInit {

ngAfterViewInit(): void {
//Timeout needed because view container might not
//be resized yey and globe will be zoomed out in that case
//be resized yet and globe will be zoomed out in that case
setTimeout(() => {
this.HsCesiumService.init();
}, 100);
Expand Down
4 changes: 2 additions & 2 deletions projects/hslayers-cesium/src/hscesium.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,11 @@ export class HsCesiumService {
}
});

this.HsLayermanagerService.data.terrainlayers = [];
this.HsLayermanagerService.data.terrainLayers = [];
if (this.HsCesiumConfig.terrain_providers) {
for (const provider of this.HsCesiumConfig.terrain_providers) {
provider.type = 'terrain';
this.HsLayermanagerService.data.terrainlayers.push(provider);
this.HsLayermanagerService.data.terrainLayers.push(provider);
}
}

Expand Down
1 change: 1 addition & 0 deletions projects/hslayers-cesium/src/picker.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
defined,
} from 'cesium';
import {Feature} from 'ol';

import {HsConfig} from 'hslayers-ng/config';
import {HsMapService} from 'hslayers-ng/shared/map';
import {HsUtilsService} from 'hslayers-ng/shared/utils';
Expand Down

0 comments on commit 386b0b8

Please sign in to comment.