title: how to set bound property in google map in react?
body: <p>could you please me how to show polylines on viewport using <code>bounds</code> or <code>getBounds</code> properties?</p>
  
  <p>currently my <code>polyline</code> are visible but I need to <code>zoomout</code> . I want to use bound property to show my line on viewport without zoomout.</p>
  
  <p>here is my code</p>
  
  <p><a href="https://stackblitz.com/edit/react-vagomb" rel="nofollow noreferrer">https://stackblitz.com/edit/react-vagomb</a></p>
  
  <p>one solution is to reduce the <code>zoom level</code> <code>8</code> to <code>6</code>  it shows some part of line .</p>
  
  <p>but I don't want to use this solution.</p>
  
  <p>using <code>bound</code>  I want to do that.</p>
  
  <pre><code>this.setState({
          bounds: null,
          polyLines: [
            { lat: 28.4911778, lng: 77.080109 },
            { lat: 28.49094725, lng: 79.07986154 },
            { lat: 28.49075711, lng: 80.08011527 },
            { lat: 28.4905529, lng: 81.08038778 },
            { lat: 27.49076661, lng: 84.08063851 }
          ],
          center: {
            lat: 29.4911717,
            lng: 77.0800426
          },
          markers: [],
          onMapMounted: ref =&gt; {
            refs.map = ref;
          },
          onBoundsChanged: () =&gt; {
            this.setState({
              bounds: refs.map.getBounds(),
              center: refs.map.getCenter()
            });
          }
  
        });
  </code></pre>
  
  <p>any update ?</p>