Circle - in bounds?

Google Code/Google Maps Bug tracker issue #6067 https://code.google.com/p/gmaps-api-issues/issues/detail?id=6067&thanks=6067&ts=1384773128

by Franz Josef Kaiser

HTML

<script src="http://maps.google.com/maps/api/js?sensor=false&amp;libraries=geometry&amp;.js"></script>
<div id="map"></div>

CSS

html, body, #map {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
}

JavaScript

"use strict";

var Vienna = new google.maps.LatLng( 48.2081743, 16.3738189 ),
    map = new google.maps.Map( 
        document.getElementById( 'map' ),
        {
            zoom      : 12,
            center    : Vienna,
            mapTypeId : google.maps.MapTypeId.ROADMAP,

            panControl         : false,
            zoomControl        : false,
            scaleControl       : false,
            streetViewControl  : false,
            overviewMapControl : false
        }
    ),
    markerCenter = new google.maps.Marker( {
        map      : map,
        position : Vienna
    } ),
    markerAPosition = new google.maps.LatLng( 48.23, 16.35 ),
    markerA = new google.maps.Marker( {
        map      : map,
        position : markerAPosition
    } ),
    markerBPosition = new google.maps.LatLng( 48.21, 16.36 ),
    markerB = new google.maps.Marker( {
        map      : map,
        position : markerBPosition
    } ),
    markerCPosition = new google.maps.LatLng( 48.222, 16.35 ),
    markerC = new google.maps.Marker( {
        map      : map,
        position : markerCPosition
    } ),
    rectangle = new google.maps.Rectangle({
        strokeColor   : '#FF0099',
        strokeOpacity : 0.8,
        strokeWeight  : 2,
        fillColor     : '#EE0990',
        fillOpacity   : 0.35,
        map           : map,
        bounds        : new google.maps.LatLngBounds(
            new google.maps.LatLng( 48.226, 16.347 ),
            new google.maps.LatLng( 48.19, 16.401 )
        )
    } ),
    rectangleBounds = rectangle.getBounds(),
    circleRadius = 2000, // Unit: meters
    circle = new google.maps.Circle( {
        map           : map,
        center        : Vienna,
        radius        : circleRadius,
        strokeColor   : '#FF0099',
        strokeOpacity : 1,
        strokeWeight  : 2,
        fillColor     : '#009ee0',
        fillOpacity   : 0.2
    } ),
    circleBounds = circle.getBounds(),
    /**
     * Tests:
     * M*CB = Marker n Circle...