~mortenoh/+junk/dhis2-detailed-import-export

« back to all changes in this revision

Viewing changes to gis/dhis-gis-geostat/mfbase/openlayers/lib/OpenLayers/Geometry/MultiPoint.js

  • Committer: larshelge at gmail
  • Date: 2009-03-03 16:46:36 UTC
  • Revision ID: larshelge@gmail.com-20090303164636-2sjlrquo7ib1gf7r
Initial check-in

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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. */
 
4
 
 
5
/**
 
6
 * @requires OpenLayers/Geometry/Collection.js
 
7
 */
 
8
 
 
9
/**
 
10
 * Class: OpenLayers.Geometry.MultiPoint
 
11
 * MultiPoint is a collection of Points.  Create a new instance with the
 
12
 * <OpenLayers.Geometry.MultiPoint> constructor.
 
13
 *
 
14
 * Inherits from:
 
15
 *  - <OpenLayers.Geometry.Collection>
 
16
 *  - <OpenLayers.Geometry>
 
17
 */
 
18
OpenLayers.Geometry.MultiPoint = OpenLayers.Class(
 
19
  OpenLayers.Geometry.Collection, {
 
20
 
 
21
    /**
 
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.
 
26
     */
 
27
    componentTypes: ["OpenLayers.Geometry.Point"],
 
28
 
 
29
    /**
 
30
     * Constructor: OpenLayers.Geometry.MultiPoint
 
31
     * Create a new MultiPoint Geometry
 
32
     *
 
33
     * Parameters:
 
34
     * components - {Array(<OpenLayers.Geometry.Point>)} 
 
35
     *
 
36
     * Returns:
 
37
     * {<OpenLayers.Geometry.MultiPoint>}
 
38
     */
 
39
    initialize: function(components) {
 
40
        OpenLayers.Geometry.Collection.prototype.initialize.apply(this, 
 
41
                                                                  arguments);
 
42
    },
 
43
 
 
44
    /**
 
45
     * APIMethod: addPoint
 
46
     * Wrapper for <OpenLayers.Geometry.Collection.addComponent>
 
47
     *
 
48
     * Parameters:
 
49
     * point - {<OpenLayers.Geometry.Point>} Point to be added
 
50
     * index - {Integer} Optional index
 
51
     */
 
52
    addPoint: function(point, index) {
 
53
        this.addComponent(point, index);
 
54
    },
 
55
    
 
56
    /**
 
57
     * APIMethod: removePoint
 
58
     * Wrapper for <OpenLayers.Geometry.Collection.removeComponent>
 
59
     *
 
60
     * Parameters:
 
61
     * point - {<OpenLayers.Geometry.Point>} Point to be removed
 
62
     */
 
63
    removePoint: function(point){
 
64
        this.removeComponent(point);
 
65
    },
 
66
 
 
67
    CLASS_NAME: "OpenLayers.Geometry.MultiPoint"
 
68
});