JustFly1984 / react-google-maps-api

React Google Maps API
MIT License
1.81k stars 437 forks source link

Zoom Control Buttons Not Zooming In or Out #3143

Open coderdix24 opened 1 year ago

coderdix24 commented 1 year ago

Please provide an explanation of the issue

When selecting the zoom control + and - button it is unresponsive not allowing any zoom effect for the map.

Your Environment

os: Mac OS 13.0 (22A380)

node --version 14.20.0

react version -- 17.0.2

webpack version 5.x

@babel version (using Next JS)

@react-google-maps/api version 2.17.0

How does it behave?

when the + button is selected it is replaced with the - sign and the - button is removed. When selecting the - button, the - sign is removed. This happened rather spontaneously last night (without modification to the Map component). Ultimately, the zoom function is not working

How should it behave correctly?

Selecting + should zoom in, while selecting - should zoom out

Basic implementation of incorrect behavior in codesandbox.com

coderdix24 commented 1 year ago

its pretty easy to just make your own custom buttons so i did that. however, another odd thing i noticed as that putting a focus on the button and using the keyboard (e.g. pressing space or enter) seems to work w/ zooming in and out...its just the on click event that seemed to be the problem.

JustFly1984 commented 1 year ago

please provide minimal reproduction in codesandbox.io