Bug #6630
closedZooming into tile on click doesn't work as expected when the map is small
0%
Description
When the map is small/not much bigger than the geohash tiles, (e.g. at 300x400 pixels and tiles at the geohash level 2), when the user clicks on a tile the Google Map doesn't zoom in very much and search triggered is very similar or not different at all. To the user, it looks like it doesn't work. We are using "fitBounds()" to resize the map. We may have to incorporate a check for the tile size: map size ratio or use a smaller tile on smaller maps... maybe a theme-specific solution... will try out some different options.
Updated by Lauren Walker almost 10 years ago
- Status changed from New to Resolved
Google Maps uses some padding when zooming into a bounding box (fitBounds()). I found a solution online that will zoom in again if there is still substantial padding left after fitBounds(). This makes smaller maps, like the one in the new DataONE theme, work better. Also the smaller map uses a different zoom:search precision ratio.