For a specific event, I draw a circle object on the map, the user enters the radius and center.

circle = new google.maps.Circle({ strokeColor: '#FF0000', strokeOpacity: 0.8, strokeWeight: 2, fillColor: '#FF0000', fillOpacity: 0.35, map: map, center: center, radius: radius }); 

It is necessary for this event to establish the center of the map at the center of the circle and the scale of the map, the largest at which the whole circle is on the screen. Well, with the center, everything is clear map.setCenter(center); , but with the scale I can not guess

    1 answer 1

     const bound = circle.getBounds(); map.fitBounds( bound ); 
    • one
      Thank! Great, everything turns out to be simple too, that map.fitBounds should be used understood, but did not know how to get the bounds of the circle - Vadim Leshkevich