saintbyte / openbmap

Automatically exported from code.google.com/p/openbmap
Other
1 stars 1 forks source link

Map zoom resets itself on restart in 00.7.00 and higher #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start a log.
2. Switch to the map.
3. Zoom in or out.
4. Stop and save, then return to home screen.
5. After some time, start another log and switch to map view.

What is the expected output? What do you see instead?
Instead of the zoom setting selected in the previous session (which was 
retained in 00.6.0x), the zoom resets itself to a very close-up zoom level.

What version of the product are you using? On what operating system?
00.7.01 on Cyanogenmod 10.1.3-RC1

Please provide any additional information below.
Versions up to 00.6.02 would preserve the zoom level across sessions; 00.7.00 
and higher reset it.

Original issue reported on code.google.com by mich...@vonglasow.com on 5 Sep 2013 at 1:56

GoogleCodeExporter commented 9 years ago
It's not a bug, it's a feature :-) It's a fail-safe zoom in MapViewActivity, 
line 139

Explanation: 
1) There's a unhandled mapsforge exception (see
issue 12)
2) If you zoom out too far (about 10 times), mapsforge crashes
3) without this fail-safe feature, MapViewActivity keeps crashing permanently 
as zoom is per default retained

So as a dirty quick-fix I added the fail-safe zoom, which resets zoom to level 
18 everything you open the MapViewActivity.

I still don't know how to fix the underlying mapsforge issue. They claim it's 
fixed, but I presume it's actually not :-( References mapsforge issue, see 
issue 12

Original comment by wish7code on 5 Sep 2013 at 2:19

GoogleCodeExporter commented 9 years ago
Hmmm... I've never experienced that, the zoom level I usually use should be 15 
(I need to zoom out three times from default to get it) and it never caused me 
crashes. Default zoom on 00.6.00 was 16 (I believe), and shouldn't be a problem 
either.

Can you query the currently selected zoom level before setting one? In that 
case, you could reset it only when a potentially unsafe zoom level is currently 
selected. From the reoprts, I conclude that "unsafe" is somewhere betwen 7 or 8 
and 14.

Original comment by mich...@vonglasow.com on 5 Sep 2013 at 7:12

GoogleCodeExporter commented 9 years ago
r3fba9c28b63e re-introduced the old-behaviour:
no fail safe zoom, instead last zoom is used

Original comment by wish7code on 16 Sep 2013 at 12:08