var shape = {"title":"Casco Veijo","description":"Old city in Panama","tags":"","points":[[8.95439, -79.53608], [8.954093, -79.533119], [8.951549, -79.531746], [8.949769, -79.531231], [8.949091, -79.531875], [8.950702, -79.534621], [8.950871, -79.537325], [8.950532, -79.538183], [8.948836, -79.543247], [8.951804, -79.543376], [8.952567, -79.541874], [8.952694, -79.541273], [8.955958, -79.541831], [8.956679, -79.541531], [8.957442, -79.540415], [8.958035, -79.53887], [8.958459, -79.537883], [8.958205, -79.537325]],"author":"Chris"};
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(8.953648, -79.537303),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());