Zoom lock/unlock. How exactly should it work?

Dmitry Lesev shared this question 6 months ago
Answered

Hi


I can't find in manual - could you please explain, what exactly should happen when the Zoom lock is turned on/off? (i mean changes of level/zoom)

Comments (14)

photo
1

Thank you Taras,


yes, i saw it -

... The zoom lock disables switching among the map zooms but allows enlarging the map view (at the cost of its blurring when extremely zooming in and illegibility of the map when extremely zooming out).....


But this button not only "disables switching among the map zooms". When i switch on/off this functionality, the current zoom is changed. An i would like to know - by what rules?

photo
1

Hi Dmitry, the zoom lock button "remembers" the map resolution you used last time. E.g. if you were in zoom 15, locked the zoom, magnified to 400%, unlocked zoom (Locus jumps back to 100%), then you changed zoom to 13 and locked it, the map jumps to zoom 13, 400%.

photo
photo
1

Hi Michal

In case if before Zoom lock i set zoom<>100% (for example =200) , why does it jump to 100 instead of back to 200% when Zoom unlocking? I think it would be more logical to restore the state that was before the launch of this function.

photo
1

Michal,

I'm using V3.23 .1 and Zoom Lock behaves differently from the way you described. Here is the behavior I see:

Image 1

Initial state of map. Zoom lock is off. Length of blue track is almost the width of the phone's screen. Zoom level is "1 km (14)"


Image 2

Zoom lock is on. Map automatically zooms in slightly because now the length of the blue track is the screen's width. However, zoom level claims it is unchanged: "1 km (14)".


Image 3

Zoom level is off again. Map automatically changes zoom level but not back to its original state in Image 1. The blue track is now much smaller and zoom level indicates: "2 km (14 | 100%)".


3ac63811b89255fb2d581d40d3de004c

photo
1

Zoom lock remembers its previous state. When unlocked, map goes back to 100%.


@TarasD: display the map/zoom status in the topbar - the value in the scale area is rounded. I'm not able to simulate the situation you described.

photo
1

OK, I displayed the map/zoom status in the topbar and repeated the test several times. The map is LoMaps New York.

First test:

  1. Zoom Lock off. Initial zoom level: "14 | 137%"
  2. Zoom Lock on. Changes to:"14 | 144%"
  3. Zoom Lock off again. Changes to "14 | 100%"

Second test:

  1. Zoom Lock off. Initial zoom level: "14 | 100%"
  2. Zoom Lock on. Changes to:"14 | 200%"
  3. Zoom Lock off again. Changes to "14 | 100%"

Third test:

  1. Zoom Lock off. Initial zoom level: "15 | 135%"
  2. Zoom Lock on. Changes to:"15 | 140%"
  3. Zoom Lock off again. Changes to "15 | 100%"

Fourth test:

  1. Zoom Lock off. Initial zoom level: "17 | 75%"
  2. Zoom Lock on. Changes to:"17 | 140%"
  3. Zoom Lock off again. Changes to "17 | 100%"

Fifth test:

  1. Zoom Lock off. Initial zoom level: "18 | 100%"
  2. Zoom Lock on. Changes to:"18 | 50%"
  3. Zoom Lock off again. Changes to "18 | 100%"

Turning off zoom lock causes the map to change to a 100% magnification level. This behavior is consistent in all five tests.


Turning on zoom lock causes the map to automatically increase the magnification level by anywhere from 5 to 100%. What rule is it following when it chooses this (seemingly arbitrary) value?

photo
1

--->"When unlocked, map goes back to 100%."

i would say currently "map goes to 100%.", without "back". And after it i have to adjust a zoom% manually (in case if it was <>100%)

Is it possible to change algorithm of work "Zoom lock" button? :

1. Zoom lock On - set zoom% as calculate value, = current zoom% * K, where k - remembered value =zoom% for "Zoom lock on" / zoom% for "Zoom lock off"

2. Zoom lock Off - restore zoom% to value as it was before "Zoom lock On"

photo
1

@TarasD try this test:


1. Zoom lock off, level 14, 100%

2. Zoom lock on, level 14, zoom in 400%

3. Zoom lock off, level 14, zoom is back at 100% - that's the situation you described in your 5 tests

4. Zoom lock off, level 15, 100%

5. Zoom lock ON, level 15, zoom jumps automatically to 400% which Locus remembers from the previous "Zoom Lock" action - that's what I'm talking about.


When there is no previous "zoomlock" action or you zoom out to 100% when zoom lock is ON, then unlock and lock the zoom again, default zoom lock value is 200%.

photo
1

@Michal

Thanks for the explanation! I followed your instructions and can confirm it behaves the way you described.

I also noticed the value of "400%" is used even if I restart Locus Map. In other words, the last zoomlock value is stored and persists from one session to another.


I guess my confusion was caused by the way I carried out my tests. When I enabled zoomlock, I never manually zoomed in. So after enabling zoomlock I could not understand why the map was "automatically" zooming in to some unexpected level. Now I understand how it works.

photo
1

Unfortunately the topic was marked as "answered" without final conclusion on my questions.

photo
1

Dmitry, you asked about the Zoom lock functionality which is described in manual http://docs.locusmap.eu/doku.php?id=manual:user_guide:maps_mainscr_ctrl#controlling_the_map - in this point the topic was already answered. Then you added more questions - you asked about the logic that we demonstrated with TarasD. And lastly, you asked us to change the button behavior - which, we are afraid, is declined as we know nobody else with the same idea.

photo
1

Hi guys,

long discussion that I really do not want to read, but just for your information. In config.cfg exists two parameters that affect behavior of zoom lock function so if there are any troubles, it may worth to check it.


- map_automatic_zoom_lock

- map_zoom_lock_remember_last_state


Have a nice day

photo
1

It was rather "bug report" (on analisys stage) than "change request" in terms of software develpment.

A bit strange that it was declined not by any logical reason but because no one has raised this question yet

Anyway, thank you for your time