Master: Allow fractional zoom stopping with Map.TouchZoom and fix CRS.scale calc with fractional zoom #3326
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Similar Pull to #3325, but different code for master.
I believe that I have found a fix to allow touch/pinch fractional zoom support (when using plain Leaflet object and or GeoJson objects). But I could not comment as to if this will break any map with tiles. I believe work has gone into master to support better fractional zoom levels, but in the latest master the problem described below still exists.
The underlying issue being solved is the "jump" in the map when stopping a touch/pinch zoom whilst the map snaps to a whole number zoom level. Our users on iPad's and Android were finding this very obvious and it was very hard for them to zoom in/out to the level of detail that they wanted.
Changes to Map.TouchZoom support stopping the zoom level exactly where the user has stopped the pinch.
The secondary issue uncovered is that the built in CRS.scale calculation also does not support fractional zoom. The side-affect of this is that when touch/pinch zooming, the percent with which the map is grown or shrunk does not reflect the final size that the map will be drawn at. Thus this means that there is still a "jump" in the map when stopping a touch/pinch zoom, even with the first fix in place.
The commit to CRS.js supports Scale calculation for fractional zoom levels.
Please refer to these related issues:
kartena/Proj4Leaflet#57
kartena/Proj4Leaflet#73
#426
#1309
http://stackoverflow.com/questions/24151177/fractional-zoom-levels
#2382
#2558