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

Fix used ogcServerName #9271

Merged
merged 1 commit into from
Dec 13, 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
11 changes: 7 additions & 4 deletions src/datasource/Manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,8 @@ export class DatasourceManager {
let timeProperty;
/** @type {import('gmf/themes').GmfOgcServer} */
let ogcServer;
/** @type {string} */
let ogcServerName;

if (ogcType === ThemeNodeType.WMTS || ogcType === ThemeNodeType.VECTOR_TILES) {
// Manage WMTS / Vector tiles
Expand Down Expand Up @@ -543,6 +545,7 @@ export class DatasourceManager {

// OGC Server
if (meta.ogcServer && ogcServers[meta.ogcServer]) {
ogcServerName = meta.ogcServer;
ogcServer = ogcServers[meta.ogcServer];
}
}
Expand Down Expand Up @@ -612,7 +615,7 @@ export class DatasourceManager {
});

// OGC Server
const ogcServerName =
ogcServerName =
!firstLevelGroup || firstLevelGroup.mixed ? gmfLayerWMS.ogcServer : firstLevelGroup.ogcServer;
ogcServer = ogcServers[ogcServerName];
ogcImageType = ogcServer.imageType;
Expand Down Expand Up @@ -750,11 +753,11 @@ export class DatasourceManager {
if (ogcServerType === ServerType.ARCGIS) {
if (
this.gmfDatasourceOptions.ogcServersSpecific &&
this.gmfDatasourceOptions.ogcServersSpecific[this.ogcServerName] &&
this.gmfDatasourceOptions.ogcServersSpecific[this.ogcServerName].arcgisWMSInfoFormat
this.gmfDatasourceOptions.ogcServersSpecific[ogcServerName] &&
this.gmfDatasourceOptions.ogcServersSpecific[ogcServerName].arcgisWMSInfoFormat
) {
options.wmsInfoFormat =
this.gmfDatasourceOptions.ogcServersSpecific[this.ogcServerName].arcgisWMSInfoFormat;
this.gmfDatasourceOptions.ogcServersSpecific[ogcServerName].arcgisWMSInfoFormat;
} else if (this.gmfDatasourceOptions.arcgisWMSInfoFormat) {
options.wmsInfoFormat = this.gmfDatasourceOptions.arcgisWMSInfoFormat;
}
Expand Down
Loading