var shape = {"title":"Alleghany West Neighborhood in Philadelphia, PA","description":"","tags":"","points":[[40.00299, -75.1522], [39.998298, -75.153271], [39.998283, -75.153274], [39.9937, -75.15432], [39.99501, -75.164623], [39.99791, -75.18742], [39.99831, -75.18742], [40.00021, -75.18672], [40.00001, -75.18842], [39.99961, -75.18942], [39.99961, -75.19032], [39.99891, -75.195418], [40.002609, -75.195318], [40.002611, -75.19532], [40.00551, -75.19452], [40.00641, -75.19382], [40.00891, -75.18982], [40.01002, -75.1855], [40.01144, -75.18185], [40.01401, -75.17882], [40.01431, -75.17812], [40.01531, -75.17652], [40.00524, -75.16743], [40.00488, -75.16525], [40.00449, -75.16363], [40.00342, -75.15543], [40.00299, -75.1522]],"author":"admin"};
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(40.00299, -75.1522),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());