Skip to content

Commit

Permalink
Merge pull request #465 from AuScope/AUS-4295
Browse files Browse the repository at this point in the history
Aus 4295
  • Loading branch information
vjf authored Dec 11, 2024
2 parents 15f69cc + 2c9f5ce commit 93d9607
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
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,6 +20,7 @@ import { GeoJsonQuerierHandler } from './custom-querier-handler/geojson-querier-
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

Expand All @@ -44,7 +45,7 @@ declare var Cesium: any;
</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 @@ export class CsMapComponent implements AfterViewInit {
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 @@ export class CsMapComponent implements AfterViewInit {

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
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

0 comments on commit 93d9607

Please sign in to comment.