var shape = {"title":"Allen Neighborhood in Buffalo, NY","description":"","tags":"","points":[[42.89506, -78.87096], [42.89326, -78.87156], [42.89344, -78.87273], [42.89362, -78.87387], [42.893849, -78.87533], [42.8941, -78.87697], [42.89426, -78.87796], [42.89446, -78.87876], [42.895559, -78.87986], [42.89658, -78.88075], [42.8972, -78.88128], [42.897539, -78.88062], [42.898059, -78.88186], [42.89856, -78.88326], [42.89876, -78.88286], [42.898789, -78.88289], [42.90026, -78.88436], [42.90088, -78.88328], [42.90166, -78.88176], [42.90185, -78.88138], [42.90206, -78.88096], [42.90207, -78.88006], [42.90208, -78.87866], [42.902089, -78.87776], [42.902089, -78.87676], [42.902099, -78.87566], [42.902104, -78.875139], [42.902111, -78.874486], [42.90213, -78.87274], [42.90214, -78.87116], [42.90214, -78.87066], [42.90215, -78.86986], [42.90216, -78.86862], [42.90126, -78.86892], [42.90016, -78.86929], [42.89936, -78.86956], [42.89849, -78.86984], [42.89668, -78.87038], [42.89605, -78.87061], [42.89506, -78.87096]],"author":"admin"};
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(42.89506, -78.87096),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());