1 /* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
2 * license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
3 * full text of the license. */
6 * @requires OpenLayers/Geometry/Collection.js
7 * @requires OpenLayers/Geometry/Polygon.js
11 * Class: OpenLayers.Geometry.MultiPolygon
12 * MultiPolygon is a geometry with multiple <OpenLayers.Geometry.Polygon>
13 * components. Create a new instance with the <OpenLayers.Geometry.MultiPolygon>
17 * - <OpenLayers.Geometry.Collection>
19 OpenLayers.Geometry.MultiPolygon = OpenLayers.Class(
20 OpenLayers.Geometry.Collection, {
23 * Property: componentTypes
24 * {Array(String)} An array of class names representing the types of
25 * components that the collection can include. A null value means the
26 * component types are not restricted.
28 componentTypes: ["OpenLayers.Geometry.Polygon"],
31 * Constructor: OpenLayers.Geometry.MultiPolygon
32 * Create a new MultiPolygon geometry
35 * components - {Array(<OpenLayers.Geometry.Polygon>)} An array of polygons
36 * used to generate the MultiPolygon
39 initialize: function(components) {
40 OpenLayers.Geometry.Collection.prototype.initialize.apply(this,
44 CLASS_NAME: "OpenLayers.Geometry.MultiPolygon"