var shape = {"title":"Airport Neighborhood in Sacramento, CA","description":"","tags":"","points":[[38.52107, -121.483138], [38.520811, -121.483141], [38.520694, -121.483142], [38.520015, -121.483147], [38.519342, -121.483152], [38.518663, -121.483145], [38.518015, -121.483135], [38.517332, -121.483127], [38.516619, -121.48312], [38.51603, -121.483114], [38.51533, -121.483109], [38.513643, -121.4831], [38.511957, -121.483082], [38.510827, -121.483061], [38.510443, -121.483054], [38.510207, -121.483031], [38.509121, -121.482989], [38.509118, -121.483048], [38.509107, -121.483211], [38.509131, -121.484237], [38.509165, -121.484409], [38.50928, -121.484667], [38.509821, -121.486011], [38.510263, -121.487085], [38.51029, -121.487224], [38.511996, -121.491738], [38.511983, -121.491853], [38.511856, -121.49191], [38.511243, -121.492015], [38.50705, -121.492102], [38.50487, -121.492152], [38.503, -121.492051], [38.502545, -121.492053], [38.502536, -121.491656], [38.502439, -121.491697], [38.502063, -121.491765], [38.500953, -121.491744], [38.500001, -121.491781], [38.499943, -121.491753], [38.499791, -121.492], [38.499689, -121.492433], [38.499695, -121.492983], [38.499555, -121.50118], [38.499484, -121.505307], [38.499429, -121.505828], [38.499419, -121.505911], [38.499347, -121.505991], [38.50186, -121.505962], [38.5025, -121.505942], [38.502828, -121.505913], [38.503304, -121.505844], [38.503525, -121.505791], [38.504151, -121.505596], [38.50456, -121.505412], [38.504757, -121.505324], [38.50511, -121.505144], [38.505424, -121.504984], [38.505807, -121.50479], [38.509288, -121.503043], [38.510503, -121.502435], [38.510569, -121.502402], [38.511373, -121.502003], [38.511905, -121.501724], [38.51232, -121.501507], [38.513123, -121.501138], [38.513258, -121.501075], [38.514219, -121.500701], [38.514487, -121.500614], [38.515851, -121.500173], [38.516158, -121.500073], [38.517099, -121.499767], [38.517812, -121.499539], [38.518721, -121.499249], [38.519491, -121.499001], [38.520465, -121.498707], [38.520925, -121.498557], [38.520898, -121.498488], [38.52088, -121.498408], [38.520733, -121.498144], [38.520787, -121.495878], [38.520844, -121.492802], [38.520854, -121.492262], [38.520906, -121.490084], [38.52098, -121.48749], [38.520997, -121.486203], [38.521007, -121.485479], [38.521069, -121.483186], [38.52107, -121.483138]],"author":"admin"};
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(38.52107, -121.483138),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());