var shape = {"title":"Area Iv Neighborhood in Cambridge, MA","description":"","tags":"","points":[[42.362729, -71.090108], [42.360244, -71.095033], [42.360981, -71.096251], [42.361165, -71.096578], [42.361392, -71.096967], [42.361757, -71.097579], [42.361892, -71.097816], [42.36197, -71.09796], [42.362007, -71.098017], [42.36265, -71.099051], [42.362868, -71.099397], [42.362981, -71.099593], [42.36318, -71.09996], [42.363509, -71.100515], [42.363749, -71.100917], [42.363899, -71.101172], [42.364014, -71.101375], [42.364432, -71.102032], [42.364734, -71.102582], [42.365574, -71.104212], [42.37225, -71.099202], [42.365206, -71.090557], [42.364714, -71.089544], [42.364501, -71.089659], [42.364206, -71.089807], [42.363812, -71.089987], [42.363468, -71.090069], [42.36314, -71.090085], [42.362729, -71.090108]],"author":"admin"};
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(42.362729, -71.090108),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());