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] Fix API QGIS on hiDPI screen #9208

Merged
merged 1 commit into from
Aug 29, 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
2 changes: 1 addition & 1 deletion api/dist/apihelp/apihelp.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ <h2>A map with a subset of overlays</h2>
div: 'map4',
zoom: 0,
center: [2590000, 1170000],
layers: ['ch.astra.hauptstrassennetz', 'polygon', 'point']
layers: ['ch.astra.hauptstrassennetz', 'polygon', 'point', 'group']
});
</pre
>
Expand Down
6 changes: 5 additions & 1 deletion api/src/Themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,13 +242,17 @@ export function getOverlayLayers(layerNames) {
* @hidden
*/
export function createWMSLayer(config, ogcServer) {
let serverType = ogcServer.type;
// OpenLayers expects 'qgis' instead of 'qgisserver'
serverType = serverType.replace('qgisserver', 'qgis');

const layer = new ImageLayer({
source: new ImageWMS({
url: ogcServer.url,
params: {
'LAYERS': config.layers,
},
serverType: ogcServer.type,
serverType: serverType,
}),
minResolution: config.minResolutionHint,
maxResolution: config.maxResolutionHint,
Expand Down
2 changes: 1 addition & 1 deletion src/map/LayerHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ LayerHelper.prototype.createBasicWMSLayer = function (
}
if (opt_serverType) {
params.SERVERTYPE = opt_serverType;
// OpenLayers expects 'qgis' insteads of 'qgisserver'
// OpenLayers expects 'qgis' instead of 'qgisserver'
olServerType = opt_serverType.replace(ServerType.QGISSERVER, 'qgis');
}

Expand Down
Loading