NINAnor/GarminCustomMaps

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

Opened this issue · 15 comments

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).

Hy,

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

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

esan0 commented

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)

Oh thanks ! It seems to be OK :)

esan0 commented

Good to know.

Closing the issue now.

Thanks @chrismuller!

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 commented

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?

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 commented

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!

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).

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

esan0 commented

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