title: Multiple Polygons on Google Maps - not working - joining up
body: <p>With the code below I can draw a polygon on a map, however the polygons are being treated as one and the api is joining them up as on polygon. I have been banging my head against this one! I need each polygon to load a different shape on the map. Which is formatted like this inside the array:</p>
  
  <pre><code>[[11.11,11.11],[22.22,22.22],[33.33,33.33]]
  </code></pre>
  
  <p>of</p>
  
  <pre><code>[[[11.11,11.11],[22.22,22.22],[33.33,33.33]],[[11.11,11.11],[22.22,22.22],[33.33,33.33]]]
  
  
  
  
  var polys = [[[51.4503639, -0.1006082], [51.4502851, -0.1000704], [51.4491791, -0.0992159], [51.4480629, -0.0978004], [51.4486121, -0.098658], [51.4503639, -0.1006082]], [[51.4225526, -0.1618125], [51.42297, -0.160525], [51.4222314, -0.1603534], [51.421847, -0.1590405], [51.4216169, -0.1583023], [51.4198131, -0.1587487], [51.4196633, -0.1579333], [51.4195509, -0.1571436], [51.4188674, -0.1577788], [51.4190548, -0.1585427], [51.4189852, -0.1594954], [51.4182427, -0.1601064], [51.4175419, -0.1606966], [51.416929, -0.1618334], [51.4175821, -0.1618763], [51.4183207, -0.1624428], [51.4181762, -0.1640049], [51.4182297, -0.1646916], [51.4191932, -0.1649233], [51.4204705, -0.1644732], [51.4211931, -0.1643445], [51.4216213, -0.1642758], [51.4209897, -0.1643016], [51.4201781, -0.163241], [51.4214072, -0.1623876], [51.4219531, -0.1621987], [51.4220602, -0.1621558], [51.4225526, -0.1618125]]]
  
    var latLng =[]
    var locs = []
  
    for (var _p=0; _p &lt; polys.length; _p++) {
        locs = polys[_p];
  
        for (_i = 0, _len = locs.length; _i &lt; _len; _i++) {
            point = locs[_i];
            latLng.push(new google.maps.LatLng(point[0], point[1]));}
  
            bermudaTriangle = new google.maps.Polygon({
             paths: latLng,
             fillColor: "#FF0000",
             fillOpacity:0.1
             });
    }
            bermudaTriangle.setMap(map);
  
  
    }
  </code></pre>
  
  <p>In the end this worked:</p>
  
  <pre><code>  var latLng =[]
    var locs = []
    for (var _p=0; _p &lt; polys.length; _p++) {
        locs = polys[_p];
        var  latLng = [];
        var bermudaTriangle = []
      for (_i = 0, _len = locs.length; _i &lt; _len; _i++) {
  
              point = locs[_i];
              latLng.push(new google.maps.LatLng(point[0], point[1]));}
  
  
      bermudaTriangle = new google.maps.Polygon({
                 paths: latLng,
                 fillColor: "#FF0000",
                 fillOpacity:0.1
      });
  
      bermudaTriangle.setMap(map);
       }
  
      }
  </code></pre>