title: React-google-maps zoom issue
body: <p>I'm using <code>react.google.maps</code> and I'm trying to display different markers based on zoom level. The problem I have is that sometimes when I zoom, the map is not updated (the map tiles are not re-rendered based on the zoom level). This happens when I have the <code>onZoomChanged</code> method defined. If I remove it, everything works ok.</p>
  
  <p>This is how my class looks like:</p>
  
  <pre><code>class Map extends Component {
    constructor(props) {
      super(props);
  
      this.googleMap = React.createRef();
  
      this.state = {
        zoom: 2
      };
    }
  
    onZoomChanged = () =&gt; {
      this.setState({
        zoom: this.googleMap.current.getZoom()
      });
    };
  
    getMarkers() {
      const { zoom } = this.state;
      let Markers = null;
  
      // get markers based on zoom
  
      return Markers;
    }
  
    render() {
      const { center } = this.props;
  
      return (
        &lt;GoogleMap
          defaultZoom={2}
          defaultCenter={{
            lat: center.latitude,
            lng: center.longitude
          }}
          defaultOptions={{
            mapTypeControl: false,
            streetViewControl: false,
            zoomControl: false,
            fullscreenControl: false,
            styles: mapStyles,
            minZoom: 2,
            maxZoom: 10
          }}
          ref={this.googleMap}
          onZoomChanged={this.onZoomChanged}
        &gt;
          {this.getMarkers()}
        &lt;/GoogleMap&gt;
      );
    }
  }
  </code></pre>
  
  <p>Here are some screenshots to illustrate the behavior:</p>
  
  <p><a href="https://i.stack.imgur.com/LBexB.png" rel="nofollow noreferrer">Actual 1</a></p>
  
  <p><a href="https://i.stack.imgur.com/TFqyv.png" rel="nofollow noreferrer">Expected 1</a></p>
  
  <p><a href="https://i.stack.imgur.com/Owfrk.png" rel="nofollow noreferrer">Actual 2</a></p>
  
  <p><a href="https://i.stack.imgur.com/4vzeM.png" rel="nofollow noreferrer">Expected 2</a></p>
  
  <p>Any help would be appreciated. Thanks in advance!</p>