peder61 / osmdroid

Automatically exported from code.google.com/p/osmdroid
0 stars 0 forks source link

Inconsistency between getZoomLevel() and getProjection() #455

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start a zoom animation using getController().zoomIn()
2. getZoomLevel() returns the new (higher) zoom level
3. getProjection() returns a projection to the old (lower) zoom level

What is the expected output? What do you see instead?
I expect getProjection() to provide a projection appropriate for the zoom level 
returned by getZoomLevel().

What version of the product are you using? On what operating system?
3.0.10

Please provide any additional information below.
There should be an additional method to get the zoom level that corresponds to 
getProjection().

Original issue reported on code.google.com by vit.hrad...@gmail.com on 27 Jul 2013 at 5:57

GoogleCodeExporter commented 9 years ago
Never mind, I see that there is getZoomLevel(final boolean aPending). This 
takes care of my issue. I would suggest leaving the issue out as a heads up to 
others, since getZoomLevel is counterintuitive (I would assume getZoomLevel to 
provide the current zoom level, corresponding to the projection returned by 
getProjection(), not the one being animated to).

Original comment by vit.hrad...@gmail.com on 27 Jul 2013 at 6:09

GoogleCodeExporter commented 9 years ago
I agree there is some questionable decisions made regarding current/pending 
zoom levels. But they have been this way for a long time and I am hesitant to 
make changes at this point.

The ideal solution is to let getZoomLevel() return a floating point number that 
represents in-between zoom levels. We also would want to be able to let users 
pinch-to-zoom and allow the map to stay at one of the in-between zoom levels 
without snapping back to a concrete (integer) zoom level like we do now.

Original comment by kurtzm...@gmail.com on 7 Aug 2013 at 2:15

GoogleCodeExporter commented 9 years ago
See issue 460.

Original comment by kurtzm...@gmail.com on 7 Aug 2013 at 2:30