var shape = {"title":"Upper East Side","description":"NYC Neighborhood","tags":"","points":[[40.764324000000002, -73.973050000000001], [40.758569999999999, -73.958673000000005], [40.760520999999997, -73.956614000000002], [40.762568999999999, -73.954252999999994], [40.770856999999999, -73.947085999999999], [40.774627000000002, -73.943051999999994], [40.775601999999999, -73.942666000000003], [40.776738999999999, -73.942622999999998], [40.779794000000003, -73.943738999999994], [40.781516000000003, -73.944339999999997], [40.782946000000003, -73.943825000000004], [40.787885000000003, -73.955798000000001]],"author":"AhmedF"};
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(40.773228, -73.957837),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());