I created a map where a user inputs a zipcode and a radius (miles) and I want the map to center on the point created from the zipcode and only display (roughly) the area that would be within that radius. I am creating a Circle with the radius and trying to get the map to fit to that circle. Right now it centers correctly but the area being shown is way more than the radius given.
me.center_map = function(latlng, r)
{
// latlng is the point of the zipcode
var circ = new google.maps.Circle();
circ.setRadius(r * 1609.0);
circ.setCenter(latlng);
map.setCenter(latlng);
map.fitBounds(circ.getBounds());
// updates markers
google.maps.event.trigger(map,'dragend');
};
EDIT: Drew the circle that I am using. Ideally the map would be zoomed in to the area within the radius.