function polygonCenter2(poly) {
var puntosres = [];	
    var lowx,
        highx,
        x1,
        y1,
        xant1,
        yant1,
        x,
        y,
        lowy,
        highy,
        lats = [],
        lngs = [],
        vertices = poly.getPath();
    for(var i=0; i<vertices.length; i++) {
      lngs.push(vertices.getAt(i).lng());
      lats.push(vertices.getAt(i).lat());
    }
    lats.sort();
    lngs.sort();
    lowx = lats[0];
    highx = lats[vertices.length - 1];
    lowy = lngs[0];
    highy = lngs[vertices.length - 1];
    var center_x = lowx + ((highx-lowx) / 2);
    var center_y = lowy + ((highy - lowy) / 2);
    puntosres.push(new google.maps.LatLng(center_x, center_y));
    var vector = 0.000016; 
    var modulo = 1;
 while (puntosres.length < 50)
 {
       x1 = center_x + (modulo * vector);
       y1 = center_y;	
       puntosres.push(new google.maps.LatLng(x1, y1));	
       x1 = center_x - (modulo * vector);
       y1 = center_y;	
       puntosres.push(new google.maps.LatLng(x1, y1)); 	
       x1 = center_x + (modulo * vector);
       y1 = center_y + (modulo * vector);	
       puntosres.push(new google.maps.LatLng(x1, y1));  	
       x1 = center_x + (modulo * vector);
       y1 = center_y - (modulo * vector);	
       puntosres.push(new google.maps.LatLng(x1, y1));   
       x1 = center_x - (modulo * vector);
       y1 = center_y + (modulo * vector);	
       puntosres.push(new google.maps.LatLng(x1, y1));  
       x1 = center_x - (modulo * vector);
       y1 = center_y - (modulo * vector);	
       puntosres.push(new google.maps.LatLng(x1, y1));  
       x1 = center_x;
       y1 = center_y + (modulo * vector);	
       puntosres.push(new google.maps.LatLng(x1, y1));   
       x1 = center_x;
       y1 = center_y - (modulo * vector);	
       puntosres.push(new google.maps.LatLng(x1, y1));   
 
 modulo =  modulo + 1;
 	
 }

   return puntosres;
}


