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
10
* Class: OpenLayers.Geometry.MultiPoint
11
* MultiPoint is a collection of Points. Create a new instance with the
12
* <OpenLayers.Geometry.MultiPoint> constructor.
15
* - <OpenLayers.Geometry.Collection>
16
* - <OpenLayers.Geometry>
18
OpenLayers.Geometry.MultiPoint = OpenLayers.Class(
19
OpenLayers.Geometry.Collection, {
22
* Property: componentTypes
23
* {Array(String)} An array of class names representing the types of
24
* components that the collection can include. A null value means the
25
* component types are not restricted.
27
componentTypes: ["OpenLayers.Geometry.Point"],
30
* Constructor: OpenLayers.Geometry.MultiPoint
31
* Create a new MultiPoint Geometry
34
* components - {Array(<OpenLayers.Geometry.Point>)}
37
* {<OpenLayers.Geometry.MultiPoint>}
39
initialize: function(components) {
40
OpenLayers.Geometry.Collection.prototype.initialize.apply(this,
46
* Wrapper for <OpenLayers.Geometry.Collection.addComponent>
49
* point - {<OpenLayers.Geometry.Point>} Point to be added
50
* index - {Integer} Optional index
52
addPoint: function(point, index) {
53
this.addComponent(point, index);
57
* APIMethod: removePoint
58
* Wrapper for <OpenLayers.Geometry.Collection.removeComponent>
61
* point - {<OpenLayers.Geometry.Point>} Point to be removed
63
removePoint: function(point){
64
this.removeComponent(point);
67
CLASS_NAME: "OpenLayers.Geometry.MultiPoint"