Colored Google Maps LatLng Bounds
Proof that the bug report is right:
Issue #4813
https://code.google.com/p/gmaps-api-issues/issues/detail?id=4813&q=apitype%3AJavascript3%20type%3ADefect%20bounds&sort=-stars&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary%20Internal%20Stars
HTML
<script src="http://maps.google.com/maps/api/js?sensor=false&libraries=geometry&.js"></script>
<div id="map"></div>
CSS
html, body, #map {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
}
JavaScript
"use strict";
var Figline = new google.maps.LatLng( 43.637527, 11.449750 ),
map = new google.maps.Map(
document.getElementById( 'map' ),
{
zoom : 13,
center : Figline,
mapTypeId : google.maps.MapTypeId.ROADMAP,
panControl : false,
zoomControl : false,
scaleControl : false,
streetViewControl : false,
overviewMapControl : false
}
),
rectangleABounds = new google.maps.LatLngBounds(
new google.maps.LatLng( 43.67, 11.40), //sw
new google.maps.LatLng( 43.63, 11.47) //ne
),
rectangleBBounds = new google.maps.LatLngBounds(
new google.maps.LatLng( 43.72, 11.45), //sw
new google.maps.LatLng( 43.68, 11.50) //ne
),
rectangleCBounds = new google.maps.LatLngBounds(
new google.maps.LatLng( 43.71, 11.44), //sw
new google.maps.LatLng( 43.67, 11.49) //ne
),
rectangleDBounds = new google.maps.LatLngBounds(
new google.maps.LatLng( 43.66, 11.42), //sw
new google.maps.LatLng( 43.65, 11.44) //ne
),
rectangleA = new google.maps.Rectangle( {
strokeColor : 'red',
strokeOpacity : 1,
strokeWeight : 8,
fillOpacity : 0,
map : map,
bounds : rectangleABounds
} ),
rectangleB = new google.maps.Rectangle( {
strokeColor : 'blue',
strokeOpacity : 1,
strokeWeight : 8,
fillOpacity : 0,
map : map,
bounds : rectangleBBounds
} ),
rectangleC = new google.maps.Rectangle( {
strokeColor : 'purple',
strokeOpacity : 1,
strokeWeight : 8,
fillOpacity : 0,
map : map,
bounds : rectangleCBounds
} ),
rectangleD = new google.maps.Rectangle( {
strokeColor : 'tan',
strokeOpacity : 1,
strokeWeight : 8,
fillOpacity : 0,
map : map,
bounds : rectangleDBounds
} ),
boundsf = rectangleABounds.union(rectangleBBounds),
boundsf = boundsf.union(rectangleCBounds),
bounds = new google.maps.LatLngBounds(new google.maps.LatLng(43.67, 11.40), new google.maps.LatLng(43.63, 11.47)),
UUU = bounds.union(new...