Skip to content

Commit

Permalink
Fix used ogcServerName
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Dec 13, 2023
1 parent 191cef2 commit c44220d
Showing 1 changed file with 7 additions and 4 deletions.
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

0 comments on commit c44220d

Please sign in to comment.