var shape = {"title":"Upper West Side","description":"NYC Neighborhood","tags":"","points":[[40.767997000000001, -73.981847999999999], [40.772838999999998, -73.993392], [40.789250000000003, -73.981461999999993], [40.799061999999999, -73.973907999999994], [40.804941999999997, -73.968457999999998], [40.800458999999996, -73.957987000000003]],"author":"AhmedF"};
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(40.786469, -73.975689),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());