var shape = {"title":"Anthem Neighborhood in Henderson, NV","description":"","tags":"","points":[[35.984206, -115.101011], [35.984206, -115.10084], [35.98418, -115.096595], [35.984154, -115.092251], [35.984102, -115.083483], [35.984102, -115.083421], [35.984101, -115.083483], [35.981416, -115.083449], [35.980894, -115.081208], [35.980464, -115.081211], [35.980173, -115.081207], [35.979554, -115.0812], [35.979547, -115.080088], [35.97954, -115.078975], [35.979533, -115.077862], [35.978623, -115.077853], [35.976803, -115.077835], [35.976795, -115.076723], [35.975885, -115.076714], [35.974975, -115.076705], [35.974955, -115.074484], [35.974044, -115.074476], [35.974035, -115.073365], [35.973123, -115.073357], [35.973115, -115.072247], [35.971293, -115.072233], [35.971312, -115.074451], [35.971315, -115.075631], [35.970527, -115.075626], [35.97028, -115.075624], [35.969503, -115.075618], [35.968603, -115.075647], [35.968595, -115.074426], [35.968589, -115.073428], [35.967676, -115.073414], [35.967663, -115.071195], [35.965813, -115.071167], [35.964429, -115.071147], [35.962155, -115.071113], [35.961269, -115.0711], [35.961268, -115.0711], [35.958533, -115.071035], [35.957619, -115.071013], [35.956704, -115.070992], [35.95601, -115.070975], [35.95579, -115.07097], [35.955797, -115.072078], [35.955804, -115.073187], [35.954888, -115.073173], [35.954894, -115.074286], [35.954925, -115.079849], [35.953111, -115.079838], [35.953097, -115.077614], [35.951282, -115.077605], [35.947651, -115.077586], [35.944928, -115.077571], [35.94491, -115.075352], [35.944002, -115.075348], [35.941277, -115.075335], [35.941307, -115.078661], [35.940364, -115.078656], [35.940364, -115.078689], [35.939451, -115.078733], [35.938706, -115.078768], [35.938248, -115.07879], [35.937857, -115.08171], [35.937649, -115.083268], [35.937119, -115.087235], [35.935453, -115.083374], [35.934668, -115.082339], [35.934465, -115.081209], [35.934395, -115.079941], [35.933793, -115.079015], [35.933061, -115.079057], [35.932879, -115.079067], [35.932905, -115.081295], [35.932234, -115.082449], [35.931291, -115.082504], [35.930253, -115.081513], [35.930253, -115.080447], [35.929744, -115.079192], [35.929549, -115.078711], [35.929406, -115.078451], [35.929164, -115.078012], [35.928589, -115.077078], [35.927509, -115.077139], [35.927491, -115.077544], [35.92759, -115.078033], [35.928032, -115.079273], [35.928214, -115.079784], [35.928536, -115.08174], [35.927921, -115.082701], [35.925769, -115.082827], [35.925601, -115.082837], [35.925168, -115.082841], [35.925186, -115.083842], [35.925214, -115.085088], [35.924606, -115.086126], [35.923016, -115.086734], [35.923006, -115.088325], [35.92295, -115.092819], [35.922031, -115.095056], [35.922006, -115.097302], [35.921971, -115.100501], [35.924414, -115.100512], [35.925504, -115.101819], [35.925569, -115.102984], [35.925667, -115.110543], [35.925668, -115.110623], [35.927615, -115.110548], [35.927621, -115.111667], [35.929514, -115.111598], [35.929518, -115.112722], [35.933301, -115.112593], [35.933299, -115.113724], [35.935189, -115.113664], [35.935185, -115.114799], [35.936129, -115.114771], [35.936124, -115.115909], [35.937067, -115.115883], [35.938009, -115.115856], [35.938002, -115.116998], [35.938944, -115.116974], [35.938936, -115.118118], [35.939876, -115.118096], [35.939867, -115.119238], [35.948059, -115.119098], [35.948054, -115.120218], [35.951685, -115.120158], [35.951685, -115.12128], [35.952594, -115.121266], [35.952595, -115.122388], [35.953505, -115.122374], [35.955325, -115.122346], [35.958917, -115.122294], [35.958913, -115.12342], [35.962494, -115.123368], [35.963428, -115.123355], [35.966077, -115.123317], [35.969643, -115.123266], [35.969796, -115.118768], [35.969773, -115.110007], [35.969773, -115.109917], [35.969719, -115.101067], [35.973339, -115.101055], [35.976961, -115.101038], [35.980561, -115.101022], [35.984206, -115.101011]],"author":"admin"};
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(35.984206, -115.101011),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());