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

[Backport master] Be able to set the arcgisWMSInfoFormat per ogcServer #9267

Merged
merged 1 commit into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
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
13 changes: 11 additions & 2 deletions src/datasource/Manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,17 @@ export class DatasourceManager {
if (wmtsUrl) {
options.wmtsUrl = wmtsUrl;
}
if (ogcServerType === ServerType.ARCGIS && this.gmfDatasourceOptions.arcgisWMSInfoFormat) {
options.wmsInfoFormat = this.gmfDatasourceOptions.arcgisWMSInfoFormat;
if (ogcServerType === ServerType.ARCGIS) {
if (
this.gmfDatasourceOptions.ogcServersSpecific &&
this.gmfDatasourceOptions.ogcServersSpecific[this.ogcServerName] &&
this.gmfDatasourceOptions.ogcServersSpecific[this.ogcServerName].arcgisWMSInfoFormat
) {
options.wmsInfoFormat =
this.gmfDatasourceOptions.ogcServersSpecific[this.ogcServerName].arcgisWMSInfoFormat;
} else if (this.gmfDatasourceOptions.arcgisWMSInfoFormat) {
options.wmsInfoFormat = this.gmfDatasourceOptions.arcgisWMSInfoFormat;
}
}
// Create the data source and add it to the cache
this.dataSourcesCache_[id] = new GmfDatasourceOGC(options);
Expand Down
6 changes: 6 additions & 0 deletions src/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -924,9 +924,15 @@ export function buildStyle(styleDescriptor) {
* @property {number} [duration] The duration of the animation in milliseconds. By default, there is no animation to the target extent.
*/

/**
* @typedef {Object} ogcServerDatasourceOptions
* @property {string} arcgisWMSInfoFormat The WMS info format to be used with Arcgis OGC server.
*/

/**
* @typedef {Object} gmfDatasourceOptions
* @property {string} arcgisWMSInfoFormat The WMS info format to be used with Arcgis OGC server.
* @property {Object<string, ogcServerDatasourceOptions>} ogcServersSpecific The OGC server specific options.
*/

export default null;
8 changes: 8 additions & 0 deletions srcapi/store/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1386,12 +1386,20 @@ export type gmfCustomCSS = {
*/
export type pytreeLidarprofileJsonUrl = string;

export type ogcServerDatasourceOptions = {
/**
* The WMS info format to be used with Arcgis OGC server.
*/
arcgisWMSInfoFormat: string;
};
export type gmfDatasourceOptions = {
/**
* The WMS info format to be used with Arcgis OGC server.
*/
arcgisWMSInfoFormat: string;
ogcServersSpecific: {[x: string]: ogcServerDatasourceOptions};
};

/**
* The full configuration
*/
Expand Down