NINAnor / GarminCustomMaps

The GarminCustomMap plugin exports the current map canvas to a .kmz-file, which is compatible with Garmin`s Custom Maps format for handheld GPS units. That way individual maps styled in QGIS can be used as background (raster) maps on the compatible Garmin GPS units, like Alpha, Astro, Dakota, Oregon, Colorado, GPSMAP 62 series, GPSMAP 64 series, GPSMAP 78 series, Edge 800, Montana, Rino, eTrex® 20 and 30.
GNU General Public License v2.0
18 stars 7 forks source link

Zoom factor impacts raster layers #28

Open VICTORIGIS opened 2 years ago

VICTORIGIS commented 2 years ago

Hey, I've found the reason why my raster layer background is not shown in the kmz file. Whenever i use a zoom factor (for example 10), the raster layer appears in the top left corner as a small tile. The rest of the tiles just has a white background, with the vector layer in front.

image

But if i use a zoom factor of 1, the raster is shown perfectly fine with all vector layer on top. This is okay for my current work, but now the resolution is not the best. I´ll play around a bit more, but maybe someone has the same problem. Just use the zoom factor 1 and then maybe load more kmz files on your garmin device...

image

esan0 commented 2 years ago

@VICTORIGIS Thanks for your observations. I have experienced issues loading KMZs generated with zoom > 1 in QGIS, but so far, my suspicion is that QGIS handling of multi-tile kmz files is the cause.

The reason I think this way is because if I load the same KMZ in a Garmin device, it shows up properly on that device.

Could you test the same KMZ that shows up as a small tile in a Garmin device and let me know if the same issues occurs?

Thanks

chrismuller commented 2 years ago

This could be the same issue as #22, for which I just left a comment that it should be reopened. I also suggested a solution (removing the statement

            mapSettings.setOutputDpi(target_dpi)

in line 384 of file GarminCustomMap.py (version 3.4.1), which I had suggested before but somehow got lost in the commit.

ninsbl commented 2 years ago

FYI: I just uploaded a new version with the fix by @chrismuller

esan0 commented 1 year ago

Hmm, sorry folks, seems as though removing this line actually breaks execution on linux. The new version of the plugin, with this fix, doesn't work on my machine with QGIS 3.28.3 (and previously on 3.28.0) with a zoom factor that is not 1.0 (it works with zoom factor = 1.0).

Can anyone confirm that the plugin works WITHOUT this line (using a zoom factor not equal to 1.0)?