Skip to content

Commit

Permalink
Merge pull request #255 from laughing0li/master
Browse files Browse the repository at this point in the history
AUS-3904
  • Loading branch information
jia020 authored May 2, 2023
2 parents 0c6a0fd + 7d2c88e commit d88c040
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/app/menupanel/activelayers/activelayerspanel.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component } from '@angular/core';
import { CsMapService, LayerHandlerService, LayerModel, ResourceType } from '@auscope/portal-core-ui';
import { CsMapService, LayerHandlerService, LayerModel, ResourceType, UtilitiesService } from '@auscope/portal-core-ui';
import { MatSliderChange } from '@angular/material/slider';
import { SplitDirection } from 'cesium';
import { UILayerModel } from '../common/model/ui/uilayer.model';
Expand Down Expand Up @@ -130,7 +130,7 @@ export class ActiveLayersPanelComponent {
* @param layer current LayerModel
*/
public getApplicableSplitLayer(layer: LayerModel): boolean {
return this.layerHandlerService.contains(layer, ResourceType.WMS);
return UtilitiesService.layerContainsResourceType(layer, ResourceType.WMS);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export class DownloadPanelComponent implements OnInit {
this.isDatasetURLSupportedLayer = config.datasetUrlSupportedLayer[this.layer.id] !== undefined;
// If it is an IRIS layer get the station information
if (config.datasetUrlAussPassLayer[this.layer.group.toLowerCase()] !== undefined &&
this.layerHandlerService.contains(this.layer, ResourceType.IRIS)) {
UtilitiesService.layerContainsResourceType(this.layer, ResourceType.IRIS)) {
this.isIRISDownloadSupported = true;
this.getIRISStationInfo();
}
Expand Down Expand Up @@ -229,7 +229,7 @@ export class DownloadPanelComponent implements OnInit {
* Runs the WCS 'DescribeCoverage' request to gather more information about the WCS resource
*/
public describeCoverage() {
if (this.layerHandlerService.contains(this.layer, ResourceType.WCS)) {
if (UtilitiesService.layerContainsResourceType(this.layer, ResourceType.WCS)) {
const wcsResources = this.layerHandlerService.getWCSResource(this.layer);
const me = this;
this.downloadWcsService.describeCoverage(wcsResources[0].url, wcsResources[0].name).subscribe(response => {
Expand Down
4 changes: 2 additions & 2 deletions src/app/menupanel/layerpanel/layerpanel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class LayerPanelComponent implements OnInit {
isDatasetURLSupportedLayer = config.datasetUrlSupportedLayer[layer.id] !== undefined;

if (config.datasetUrlAussPassLayer[layer.group.toLowerCase()] !== undefined &&
this.layerHandlerService.contains(layer, ResourceType.IRIS)) {
UtilitiesService.layerContainsResourceType(layer, ResourceType.IRIS)) {
isIRISDownloadSupported = true;
}

Expand Down Expand Up @@ -348,7 +348,7 @@ export class LayerPanelComponent implements OnInit {
* @param layer current LayerModel
*/
public getApplicableSplitLayer(layer: LayerModel): boolean {
return this.layerHandlerService.contains(layer, ResourceType.WMS);
return UtilitiesService.layerContainsResourceType(layer, ResourceType.WMS);
}

/**
Expand Down

0 comments on commit d88c040

Please sign in to comment.