source:
trunk/workshop-routing-foss4g/web/OpenLayers/lib/OpenLayers/Geometry/MultiPoint.js
@
76
Revision 76, 2.1 KB checked in by djay, 12 years ago (diff) | |
---|---|
|
Line | |
---|---|
1 | /* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for |
2 | * full list of contributors). Published under the Clear BSD license. |
3 | * See http://svn.openlayers.org/trunk/openlayers/license.txt for the |
4 | * full text of the license. */ |
5 | |
6 | /** |
7 | * @requires OpenLayers/Geometry/Collection.js |
8 | * @requires OpenLayers/Geometry/Point.js |
9 | */ |
10 | |
11 | /** |
12 | * Class: OpenLayers.Geometry.MultiPoint |
13 | * MultiPoint is a collection of Points. Create a new instance with the |
14 | * <OpenLayers.Geometry.MultiPoint> constructor. |
15 | * |
16 | * Inherits from: |
17 | * - <OpenLayers.Geometry.Collection> |
18 | * - <OpenLayers.Geometry> |
19 | */ |
20 | OpenLayers.Geometry.MultiPoint = OpenLayers.Class( |
21 | OpenLayers.Geometry.Collection, { |
22 | |
23 | /** |
24 | * Property: componentTypes |
25 | * {Array(String)} An array of class names representing the types of |
26 | * components that the collection can include. A null value means the |
27 | * component types are not restricted. |
28 | */ |
29 | componentTypes: ["OpenLayers.Geometry.Point"], |
30 | |
31 | /** |
32 | * Constructor: OpenLayers.Geometry.MultiPoint |
33 | * Create a new MultiPoint Geometry |
34 | * |
35 | * Parameters: |
36 | * components - {Array(<OpenLayers.Geometry.Point>)} |
37 | * |
38 | * Returns: |
39 | * {<OpenLayers.Geometry.MultiPoint>} |
40 | */ |
41 | initialize: function(components) { |
42 | OpenLayers.Geometry.Collection.prototype.initialize.apply(this, |
43 | arguments); |
44 | }, |
45 | |
46 | /** |
47 | * APIMethod: addPoint |
48 | * Wrapper for <OpenLayers.Geometry.Collection.addComponent> |
49 | * |
50 | * Parameters: |
51 | * point - {<OpenLayers.Geometry.Point>} Point to be added |
52 | * index - {Integer} Optional index |
53 | */ |
54 | addPoint: function(point, index) { |
55 | this.addComponent(point, index); |
56 | }, |
57 | |
58 | /** |
59 | * APIMethod: removePoint |
60 | * Wrapper for <OpenLayers.Geometry.Collection.removeComponent> |
61 | * |
62 | * Parameters: |
63 | * point - {<OpenLayers.Geometry.Point>} Point to be removed |
64 | */ |
65 | removePoint: function(point){ |
66 | this.removeComponent(point); |
67 | }, |
68 | |
69 | CLASS_NAME: "OpenLayers.Geometry.MultiPoint" |
70 | }); |
Note: See TracBrowser
for help on using the repository browser.