title: OpenLayers - how do I draw a multipolygon?
body: <p>I don't is this the right way to do this, but OpenLayers draws only the last polygon from array of polygons.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>          for (...) {
                  var pointList = [];
                  var polygonList = [];
                  for (...) {
                      var newPoint = new OpenLayers.Geometry.Point(..X,...Y);
                      pointList.push(newPoint);
                  }
  
                  var linearRing = new OpenLayers.Geometry.LinearRing(pointList);
                  var polygons = new OpenLayers.Geometry.Polygon([linearRing]);
                  polygonList.push(polygons);
            }
  
            var style_polygon2 = {
                  strokeColor: "#05fbff",
                  strokeOpacity: 1,
                  strokeWidth: 2,
                  fillColor: "#05fbff",
                  fillOpacity: 0.2
  
            };
  
            var multiPol = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPolygon(polygonList), null, style_polygon2);
            ...layer.addFeatures(multiPol);
  </code></pre>
  
  <p>Please let me know if somebody had done something like this...</p>
  
  <p>Thank you!</p>