Files
openlayers/lib/OpenLayers/Geometry/MultiPoint.js
crschmidt 044368664f Tag OpenLayers 2.4-rc3.
git-svn-id: http://svn.openlayers.org/tags/openlayers/release-2.4-rc3@3113 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-05-02 14:20:28 +00:00

55 lines
1.5 KiB
JavaScript

/* Copyright (c) 2006 MetaCarta, Inc., published under the BSD license.
* See http://svn.openlayers.org/trunk/openlayers/release-license.txt
* for the full text of the license. */
/**
* @class
*
* MultiPoint is a collection of Points.
*
* @requires OpenLayers/Geometry/Collection.js
*/
OpenLayers.Geometry.MultiPoint = OpenLayers.Class.create();
OpenLayers.Geometry.MultiPoint.prototype =
OpenLayers.Class.inherit(OpenLayers.Geometry.Collection, {
/**
* An array of class names representing the types of components that
* the collection can include. A null value means the component types
* are not restricted.
* @type Array(String)
*/
componentTypes: ["OpenLayers.Geometry.Point"],
/**
* @constructor
*
* @param {Array(OpenLayers.Geometry.Point)} components
*/
initialize: function(components) {
OpenLayers.Geometry.Collection.prototype.initialize.apply(this,
arguments);
},
/**
* Wrapper for addComponent()
*
* @param {OpenLayers.Geometry.Point} point
* @param {int} index
*/
addPoint: function(point, index) {
this.addComponent(point, index);
},
/**
* Wrapper for removeComponent()
*
* @param {OpenLayers.Geometry.Point} point
*/
removePoint: function(point){
this.removeComponent(point);
},
/** @final @type String */
CLASS_NAME: "OpenLayers.Geometry.MultiPoint"
});