Skip to content

Commit

Permalink
Merge pull request #9271 from camptocamp/arcgis-10.9-GEO-6931
Browse files Browse the repository at this point in the history
Fix used ogcServerName
  • Loading branch information
sbrunner authored Dec 13, 2023
2 parents 905a427 + 5ea108c commit 4b2add2
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 4b2add2

Please sign in to comment.