Skip to content

Commit

Permalink
Merge pull request #9273 from camptocamp/backport/9271-to-2.8
Browse files Browse the repository at this point in the history
[Backport 2.8] Fix used ogcServerName
  • Loading branch information
sbrunner authored Dec 13, 2023
2 parents 037bb18 + 3646d0b commit e25a94a
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 e25a94a

Please sign in to comment.