Skip to content

Commit

Permalink
Merge pull request #9272 from camptocamp/backport/9271-to-master
Browse files Browse the repository at this point in the history
[Backport master] Fix used ogcServerName
  • Loading branch information
sbrunner authored Dec 13, 2023
2 parents 191cef2 + c44220d commit 92cfe6c
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 92cfe6c

Please sign in to comment.