yaapu / HorusMappingWidget

Offline GPS Mapping Widget for Horus and T16 radios
GNU General Public License v3.0
91 stars 26 forks source link

Allow users to select zoom levels #23

Closed MrD-RC closed 3 years ago

MrD-RC commented 3 years ago

This change allows the users to select the zoom levels in the configuration file. For example, zoom levels -1, 1, and 4. They no longer need to be linear.

https://youtu.be/PH1bHfxPpTI

Fixes #18

MrD-RC commented 3 years ago

One thing I have noticed is that the SCRIPTS/TOOLS/Yaapu Maps.lua seems to be different in the SOURCE and SD card folders. There seems to be functionality in the SD card version which is missing from the SOURCE version. So it would be worth checking this before merging anything.

yaapu commented 3 years ago

Hi, thanks but I'm about to update the widget. I will add google maps support soon downloaded via the MissionPlanner GCS. The new feature will also bring in a new way of controlling zoom by using a switch like a wheel, up =increase zoom every 2sec, down=decrease zoom every 2 sec, mid do nothing, it will work for both gmapcatcher maps and google maps

MrD-RC commented 3 years ago

@yaapu will this new feature allow you to skip zoom levels? I don't think having every zoom level will be good for storage. Especially for people who fly from many places.

yaapu commented 3 years ago

Why skipping? Only high def zoom levels take a lot of storage, if you do not use high def zoom you can set max zoom in the menu. Google maps has 1 to 20 zoom, 20 being high def. I like to have high def for each site, so I set max zoom in the config at 20, if you don't care or don't want to download high def tiles, set max at 18 or 19 in the config and you're set, there really is no point in downloading level 20, skipping 19 and downloading 18, storage requirement decreases with the square

MrD-RC commented 3 years ago

I want to skip because it’s not necessary to have all in-between levels. Based on the GMapCatcher scales. I find -1 is as far as you need to zoom in. Above that, level 0 isn’t needed because level 1 has enough detail to get me to the correct place at level -1. Likewise, after 1 I go to level 3, as there is no need for 2. Also, no need to go above 3.

I understand that the lesser the zoom level, the less space is needed. But in my case, to add level 0 would require another 2.5GB of space. Level 2 would only add another 250MB. Its the un-needed more detailed levels that could ideally be skipped.

yaapu commented 3 years ago

...mhmm I see 2.5GB is a lot of wasted storage and time, unfortunately is hard to make everybody happy :-) need to think of a way to allow users to have either continuous zoom or 3 fixed zoom levels

Papsi77 commented 3 years ago

I would prefer a selectable zoom level because I have already installed all the maps(from Mission Planner) for my flight areas on the TX16S.

MrD-RC commented 3 years ago

I'm very new to LUA, this is the first thing that I've done. However, it seems like the options for configuration screens on the transmitter is very limited. You could easily have an array of the zoom levels, but that would require manual editing of the configuration file, which isn't great for user friendliness.

yaapu commented 3 years ago

Hi, very good idea! a LUA table of enabled zoom levels can be easily done, I might add an option in the lua sensors config file this would make everybody happy: -) Something like activeZoomLevels = {20,19,17,15} If the table is defined it will be used, otherwise the up/down would scan all zoom levels, how's that?

yaapu commented 3 years ago

even easier could be a dedicated file for zoom levels like _modelname_zoom.cfg much easier to get right even for unexperienced users

MrD-RC commented 3 years ago

That sounds like a great solution. Everybody wins.

MrD-RC commented 3 years ago

Just thinking. If an array in a config file is used. The up/down momentary switch could still be used, as you mentioned earlier. This way, you can have as many zoom levels as you like and still skip to only the levels relevant to you.

yaapu commented 3 years ago

yeah, this was implied, sorry for not making it clear

MrD-RC commented 3 years ago

House keeping Closed due to not being merged.

yaapu commented 3 years ago

@MrD-RC would you test this new version please? HorusMappingWidget_1.2dev.ZIP

check the /CFG/examples/yaapudev_sensors_maps.lua it has the zoomLevels table to define valid zoom levels. This version also supports google maps as mapping provider, to download the maps you need to follow the "other" wiki here

Thanks a lot for raising the issue and for the "long" patience :-)