-
-
Notifications
You must be signed in to change notification settings - Fork 977
Description
NavigationControl’s Zoom In and Zoom Out buttons always increment and decrement the zoom level by exactly one, even if the initial zoom level isn’t an integer. For example, if the map is at zoom level 14.5 and you click Zoom In, the resulting zoom level is 15.5. This is inconsistent with the + and − keyboard shortcuts, which round the zoom level to the nearest integer. The Zoom In and Zoom Out buttons should likewise round the zoom level.
These buttons should behave consistently with the keyboard shortcuts, because some people are only able to use one or the other at any given time. They have the same plus and minus signs, so the user would have no reason to believe they’d behave differently. Of the two behaviors, style authors would likely appreciate rounding to the nearest integer. Zoom stops are only evaluated at integer zoom levels: mapbox/mapbox-gl-js#13291. Moreover, raster basemap tiles (as opposed to satellite imagery) easily appear blurry at fractional zoom levels, so users would want an easy way to get to something more legible.