forked from googlemaps/v3-utility-library
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUGFIX: Adjust zoom handling for cluster marker
Always zoom in when you click the cluster marker. If zoomOnClick is enabled and the map aspect ration is special the zoom in does not work. See issue googlemaps#437 for more information.
- Loading branch information
1 parent
141697f
commit 76fee84
Showing
1 changed file
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76fee84
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the fitBounds call in line 177 doing anything now? What if fitBounds would normally cause the map to zoom in by two levels? It wouldn't work because the setZoom call in line 178 just increases the zoom level by 1. Perhaps after the fitBounds you should set newZoom to the max of newZoom and the current zoom.