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

Fix: Correct print scales even when constrainResolution is true #1938

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

sweco-seguro
Copy link
Contributor

Correct print scales are now retained even when the ConstrainResolution option is true.

ConstrainResolution gets temporarily set to false when using the print component and is restored once the print component is closed.

Fixes #1934 in regard to ConstrainResolution. The scales are however still constrained by the max and min resolutions of the map, regardless of if ConstrainResolution is true or false.

Correct print scales are now retained even when
the ConstrainResolution option is true.

ConstrainResolution gets temporarily set to false
when using the print component and is restored once
the print component is closed.
@Grammostola
Copy link
Contributor

It appears to work as intended, i.e if print scales are supplied then those are available in the scale dropdown, if they aren't supplied then the dropdown shows the scales of the map. I haven't seen a need or renderMode: vector for vector tiles either as I see no quality loss when employing even print scales that do not rhyme with the vector tile cache.

A question I see is a cached WMTS or WMS map with no underlying WMS and zooming with pinch or scroll. The MDK cached background map service doesn't seem to have a problem but I'm not aware of how it is setup. That map does not employ constrainResolution and the tile requests never seem to miss. If someone has a setup with a cached map that needs constrainResolution (because there is no underlying wms service) then maybe they could advice what happens without constrainResolution. If a problem then this PR could simply be a print config option.

@Grammostola Grammostola merged commit 34d4b03 into origo-map:master Jan 30, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

constrainResolution + print scales issue
2 participants