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-4055 Fixed Custom WMS URL does not work if there are parameters #313

Merged
merged 3 commits into from
Nov 28, 2023
Merged
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
7 changes: 6 additions & 1 deletion src/app/menupanel/custompanel/custompanel.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class CustomPanelComponent {
// Trim all whitespace, line terminators, quotes, back quotes and double quotes from ends of URL
const leftTrimRe = /^[\s"'`]+/gms;
const rightTrimRe = /[\s"'`]+$/gms;
const searchUrl = this.searchUrl.replace(leftTrimRe, '').replace(rightTrimRe, '');
let searchUrl = this.searchUrl.replace(leftTrimRe, '').replace(rightTrimRe, '');

// If KML URL ...
if (searchUrl.toLowerCase().endsWith('.kml')) {
Expand Down Expand Up @@ -239,6 +239,11 @@ export class CustomPanelComponent {
} else {
// If OGC WMS Service ...
// Send an OGC WMS 'GetCapabilities' request
searchUrl = decodeURIComponent(searchUrl);
if (searchUrl.indexOf('?') > 0){
searchUrl = searchUrl.substring(0,searchUrl.indexOf('?'));
this.searchUrl = searchUrl;
}
this.layerHandlerService.getCustomLayerRecord(searchUrl).subscribe(layerRecs => {
this.loading = false;
if (layerRecs != null) {
Expand Down
Loading