var shape = {"title":"Alessandro Neighborhood in San Bernardino, CA","description":"","tags":"","points":[[34.112088, -117.323043], [34.112411, -117.323024], [34.112531, -117.32298], [34.112723, -117.32288], [34.1128, -117.322831], [34.113074, -117.322653], [34.113268, -117.322593], [34.113497, -117.322568], [34.113947, -117.322558], [34.114886, -117.322559], [34.115811, -117.322551], [34.116405, -117.322553], [34.116951, -117.322556], [34.117636, -117.322563], [34.118328, -117.322567], [34.119579, -117.322558], [34.119899, -117.322551], [34.119925, -117.322551], [34.120519, -117.322559], [34.121223, -117.322547], [34.121249, -117.322547], [34.121336, -117.322547], [34.121312, -117.321674], [34.121326, -117.320855], [34.121341, -117.319113], [34.121326, -117.317686], [34.121328, -117.316602], [34.121323, -117.316065], [34.121316, -117.314966], [34.121325, -117.313826], [34.120471, -117.313827], [34.119573, -117.313817], [34.118631, -117.313821], [34.117721, -117.313821], [34.115822, -117.313819], [34.115738, -117.313819], [34.11488, -117.313819], [34.113941, -117.31383], [34.113015, -117.313833], [34.112071, -117.313834], [34.111148, -117.313831], [34.11022, -117.313831], [34.109307, -117.313835], [34.108397, -117.313839], [34.108389, -117.315093], [34.108351, -117.315093], [34.108348, -117.316218], [34.108334, -117.317356], [34.108348, -117.318505], [34.108348, -117.319703], [34.108388, -117.319703], [34.108387, -117.320357], [34.108394, -117.320904], [34.108405, -117.321999], [34.108397, -117.32301], [34.10923, -117.322998], [34.110158, -117.323023], [34.1108, -117.32303], [34.112088, -117.323043]],"author":"admin"};
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(34.112088, -117.323043),5);
map.addControl(new GSmallMapControl());
var latlngs = [];
for (var i=0; i<shape.points.length; i++)
{
    latlngs[i] = new GLatLng(shape.points[i][0], shape.points[i][1]);
}
var poly = new GPolygon(latlngs, '#ff0000', 3, .8, '#ff0000', .4);
map.addOverlay(poly);
var bounds = poly.getBounds();
map.setZoom(map.getBoundsZoomLevel(bounds));
map.panTo(bounds.getCenter());