Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aus 4295 #465

Merged
merged 3 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions src/app/cesium-map/csmap.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
import { Observable, forkJoin, throwError } from 'rxjs';
import { catchError, finalize, tap, timeout } from 'rxjs/operators';
import { ToolbarComponent } from 'app/menupanel/toolbar/toolbar.component';
import { NVCLBoreholeAnalyticService } from 'app/modalwindow/layeranalytic/nvcl/nvcl.boreholeanalytic.service';

declare var Cesium: any;

Check warning on line 25 in src/app/cesium-map/csmap.component.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected var, use let or const instead

Check warning on line 25 in src/app/cesium-map/csmap.component.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected var, use let or const instead

@Component({
selector: 'app-cs-map',
Expand All @@ -44,7 +45,7 @@
</ac-map>
</div>
`,
providers: [ViewerConfiguration], // Don't forget to Provide it
providers: [ViewerConfiguration,NVCLBoreholeAnalyticService], // Don't forget to Provide it
styleUrls: ['./csmap.component.scss']
// The "#" (template reference variable) matters to access the map element with the ViewChild decorator!
})
Expand Down Expand Up @@ -78,7 +79,8 @@
constructor(private csMapObject: CsMapObject, private csMapService: CsMapService, private modalService: BsModalService,
private queryWMSService: QueryWMSService, private gmlParserService: GMLParserService,
private manageStateService: ManageStateService, private advancedMapComponentService: AdvancedComponentService,
private userStateService: UserStateService, private viewerConf: ViewerConfiguration, private ngZone: NgZone) {
private userStateService: UserStateService, private nvclBoreholeAnalyticService: NVCLBoreholeAnalyticService,
private viewerConf: ViewerConfiguration, private ngZone: NgZone) {
this.csMapService.getClickedLayerListBS().subscribe((mapClickInfo) => {
this.handleLayerClick(mapClickInfo);
});
Expand Down Expand Up @@ -178,6 +180,19 @@

ngAfterViewInit() {
this.csMapService.init();
// This code is used to display the map for nvclanid job's urlLink
const nvclanid = UtilitiesService.getUrlParameterByName('nvclanid');
if (nvclanid) {
const me = this;

Check warning on line 186 in src/app/cesium-map/csmap.component.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected aliasing of 'this' to local variable

Check warning on line 186 in src/app/cesium-map/csmap.component.ts

View workflow job for this annotation

GitHub Actions / build

Unexpected aliasing of 'this' to local variable
this.nvclBoreholeAnalyticService.getNVCLGeoJson(nvclanid).subscribe(results => {
if (typeof results === 'object') {
window.alert('This analytical job could not be found!\n the nvclanid = ' + nvclanid);
} else {
const jsonData = results;
me.nvclBoreholeAnalyticService.addGeoJsonLayer(nvclanid,jsonData);
}
});
}

// This code is used to display the map state stored in a permanent link
const stateId = UtilitiesService.getUrlParameterByName('state');
Expand Down
10 changes: 0 additions & 10 deletions src/app/menupanel/common/filterpanel/filterpanel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,6 @@ export class FilterPanelComponent implements OnInit, AfterViewInit {
// Add any layer specific advanced filter components
this.advancedComponentService.addAdvancedFilterComponents(this.layer, this.advancedFilterComponents);

// LJ: nvclAnalyticalJob external link
const nvclanid = UtilitiesService.getUrlParameterByName('nvclanid');
if (nvclanid) {
if (this.layer.id === 'nvcl-v2-borehole') {
this.layer.filterCollection['mandatoryFilters'][0].value = nvclanid;
setTimeout(() => {
this.addLayer(this.layer);
});
}
}
}

/**
Expand Down
Loading