var shape = {"title":"Westmorland Neighborhood in Madison, WI","description":"","tags":"","points":[[43.051147, -89.443239], [43.049988, -89.444788], [43.049223, -89.445791], [43.048529, -89.446808], [43.047981, -89.447723], [43.04754, -89.448509], [43.047519, -89.448557], [43.046857, -89.450047], [43.046391, -89.451148], [43.046684, -89.451138], [43.047565, -89.451133], [43.047986, -89.451131], [43.048404, -89.451129], [43.049233, -89.451124], [43.049605, -89.451122], [43.050089, -89.451123], [43.051127, -89.451124], [43.051925, -89.451125], [43.052718, -89.451125], [43.053547, -89.451126], [43.054953, -89.451127], [43.056127, -89.451125], [43.057852, -89.451122], [43.059108, -89.451123], [43.059931, -89.451124], [43.060821, -89.451124], [43.060803, -89.449326], [43.060785, -89.447469], [43.060766, -89.445598], [43.060759, -89.444885], [43.060752, -89.444208], [43.060752, -89.443721], [43.060749, -89.441908], [43.060747, -89.440469], [43.060759, -89.440291], [43.060771, -89.440108], [43.060775, -89.439605], [43.060777, -89.438732], [43.060065, -89.438729], [43.059915, -89.438728], [43.059106, -89.438724], [43.05865, -89.438721], [43.058271, -89.438722], [43.057444, -89.438724], [43.057249, -89.438724], [43.056613, -89.438722], [43.055797, -89.438718], [43.055712, -89.438644], [43.055689, -89.438407], [43.055303, -89.437985], [43.054716, -89.438901], [43.053589, -89.4404], [43.05351, -89.440488], [43.052872, -89.441202], [43.052338, -89.441799], [43.051147, -89.443239]],"author":"admin"};
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(43.051147, -89.443239),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());