var shape = {"title":"Ardon Heights Neighborhood in New York City-Staten Island, NY","description":"","tags":"","points":[[40.566009, -74.193301], [40.566146, -74.192456], [40.563244, -74.191286], [40.563771, -74.190729], [40.564315, -74.188645], [40.565647, -74.186218], [40.566242, -74.182792], [40.565576, -74.178485], [40.562502, -74.170811], [40.561532, -74.17193], [40.560171, -74.173501], [40.548759, -74.179581], [40.547014, -74.180849], [40.54188, -74.18556], [40.5401, -74.18718], [40.54627, -74.19008], [40.5449, -74.19535], [40.543603, -74.197382], [40.550684, -74.201151], [40.55623, -74.20306], [40.558188, -74.204806], [40.558282, -74.203244], [40.560148, -74.19915], [40.566009, -74.193301]],"author":"admin"};
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(40.566009, -74.193301),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());