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

remove wms previews or legends when blank #231

Merged
merged 1 commit into from
Feb 14, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
</p>
</div>
<p *ngIf="wmsUrl!=undefined">
<b>WMS Preview: </b><img appImgLoading src="{{wmsUrl}}" height="100" width="100"/>
<b>WMS Preview: </b><img appImgLoading src="{{wmsUrl}}" (error)="onImgError($event)" height="100" width="100"/>
</p>
<p *ngIf="legendUrl!=undefined">
<b>Legend: </b><img appImgLoading src="{{legendUrl}}" class="infopanel-legend"/>
<b>Legend: </b><img appImgLoading src="{{legendUrl}}" (error)="onImgError($event)" class="infopanel-legend"/>
</p>
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,14 @@ export class InfoPanelSubComponent implements OnChanges {
+ ',' + bbox.eastBoundLongitude + ',' + bbox.northBoundLatitude
+ '&WIDTH=400&HEIGHT=400';
this.wmsUrl = UtilitiesService.addUrlParameters(UtilitiesService.rmParamURL(onlineResources[j].url), params);
console.log(this.wmsUrl)
}
}
}
}
public onImgError(event: Event) {
// (event.target as HTMLImageElement).style.display = 'none';
(event.target as HTMLImageElement).parentElement.style.display = 'none';
}

}