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

Scaling with Zoom-Factor no longer works (QGIS since 3.22?) #22

Open
chrismuller opened this issue Feb 27, 2022 · 15 comments
Open

Scaling with Zoom-Factor no longer works (QGIS since 3.22?) #22

chrismuller opened this issue Feb 27, 2022 · 15 comments

Comments

@chrismuller
Copy link
Contributor

Not sure exactly since which version, but with 3.22 and 3.24 the scaling of a raster map with a Zoom-Factor =! 1.0 no longer works.

Solution: Comment out line 345 in GarminCustomMap.py

This line:
345: mapSettings.setOutputDpi(target_dpi)

is not needed and makes the map not being scaled (with all but the original canvas being white).

chrismuller added a commit to chrismuller/GarminCustomMaps that referenced this issue Feb 27, 2022
@veroniqueC
Copy link

Hy,

I have same issue with scaling, the raster appears not scaled in the bottom left of the kmz

@veroniqueC
Copy link

No i can't upgrading my QGIS version because for the moment QGIS 3.22 is the official version of my company.

@esan0
Copy link
Contributor

esan0 commented Aug 30, 2022

Hmmm, I can't test this because in the latest plugin version 3.4.1 and QGIS 3.26 zoom-factor is working. I get correctly scaled multi-jpg kmz files.

Try this fix suggested above by @chrismuller and please report back.

Open:
.local/share/QGIS/QGIS3/profiles/default/python/plugins/GarminCustomMap/GarminCustomMap.py

and comment the line
mapSettings.setOutputDpi(target_dpi)

by adding a # in front of the line to make it like this:
#mapSettings.setOutputDpi(target_dpi)

@veroniqueC
Copy link

Oh thanks ! It seems to be OK :)

@esan0
Copy link
Contributor

esan0 commented Aug 30, 2022

Good to know.

Closing the issue now.

Thanks @chrismuller!

@esan0 esan0 closed this as completed Aug 30, 2022
@veroniqueC
Copy link

arf nope sorry, after some tests....when i got a vector on my raster i can see an offset between the raster and the vector :( and on google maps i can see that the raster is not well positionning...

@esan0
Copy link
Contributor

esan0 commented Aug 30, 2022

arf nope sorry, after some tests....when i got a vector on my raster i can see an offset between the raster and the vector :( and on google maps i can see that the raster is not well positionning...

Could you post a screenshot of what you are describing?

@veroniqueC
Copy link

veroniqueC commented Aug 31, 2022 via email

@veroniqueC
Copy link

exemple_decalage

@veroniqueC
Copy link

So after some tests, it' s came from my double screen ! With one screen all is ok and well positionning, with two screens, there is an offset...perhaps it's came from resolution?

@esan0
Copy link
Contributor

esan0 commented Sep 7, 2022

Thank you, VeroniqueC for all your testing! I think that you're right -- this issue is related to something other than the zoom-factor setting. I will keep this issue closed, but the double-monitor situation should be looked at as a bug. Could you open a separate issue and provide details in there, such as OS, versions of packages and QGIS, and the screenshots?

By the way, only the screenshot you posted recently is visible. The ones from August 31st are not showing up.

Thanks!

@chrismuller
Copy link
Contributor Author

Can you please reopen this issue. My suggested patch, i.e. commenting out the statement

            384: mapSettings.setOutputDpi(target_dpi)

which is now in line 384 of version 3.4.1, did not make into the committed version.

With this line still in, I still have the same issue that the zooming does not work for raster maps. I only get a large white canvas with the original raster map in the top left corner (i.e. the canvas is made bigger, but not the raster map itself). Whereas if I comment this line out, everything is working fine (also in 3.28.1).

chrismuller added a commit to chrismuller/GarminCustomMaps that referenced this issue Nov 21, 2022
Issue NINAnor#22 was closed despite my suggested solution did not make it in the committed code (see comment left to issue NINAnor#22)
@ninsbl ninsbl reopened this Nov 21, 2022
@ninsbl
Copy link
Contributor

ninsbl commented Nov 21, 2022

@esan0 Do you agree with the change in #29 ?

@esan0
Copy link
Contributor

esan0 commented Nov 21, 2022 via email

ninsbl pushed a commit that referenced this issue Nov 21, 2022
Issue #22 was closed despite my suggested solution did not make it in the committed code (see comment left to issue #22)
@ninsbl
Copy link
Contributor

ninsbl commented Nov 21, 2022

FYI: I just uploaded a new version with the fix by @chrismuller Hope it gets approved soon, so it can be more widely tested...

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

No branches or pull requests

4 participants