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/Point.js
11 * Class: OpenLayers.Geometry.MultiPoint
12 * MultiPoint is a collection of Points. Create a new instance with the
13 * <OpenLayers.Geometry.MultiPoint> constructor.
16 * - <OpenLayers.Geometry.Collection>
17 * - <OpenLayers.Geometry>
19 OpenLayers.Geometry.MultiPoint = 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.Point"],
31 * Constructor: OpenLayers.Geometry.MultiPoint
32 * Create a new MultiPoint Geometry
35 * components - {Array(<OpenLayers.Geometry.Point>)}
38 * {<OpenLayers.Geometry.MultiPoint>}
40 initialize: function(components) {
41 OpenLayers.Geometry.Collection.prototype.initialize.apply(this,
47 * Wrapper for <OpenLayers.Geometry.Collection.addComponent>
50 * point - {<OpenLayers.Geometry.Point>} Point to be added
51 * index - {Integer} Optional index
53 addPoint: function(point, index) {
54 this.addComponent(point, index);
58 * APIMethod: removePoint
59 * Wrapper for <OpenLayers.Geometry.Collection.removeComponent>
62 * point - {<OpenLayers.Geometry.Point>} Point to be removed
64 removePoint: function(point){
65 this.removeComponent(point);
68 CLASS_NAME: "OpenLayers.Geometry.MultiPoint"