Tim's big refactoring of the Geometry modules. Fixes #590. All tests pass in FF (except the PanZoomBar stuff, which wasn't touched by this patch) and IE.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@2931 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -13,6 +13,14 @@ OpenLayers.Geometry.MultiLineString = OpenLayers.Class.create();
|
||||
OpenLayers.Geometry.MultiLineString.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.LineString"],
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*
|
||||
@@ -23,20 +31,6 @@ OpenLayers.Geometry.MultiLineString.prototype =
|
||||
arguments);
|
||||
},
|
||||
|
||||
/**
|
||||
* adds a component to the MultiPoint, checking type
|
||||
*
|
||||
* @param {OpenLayers.Geometry.LineString} component lineString to add
|
||||
* @param {int} index Index into the array to insert the component
|
||||
*/
|
||||
addComponent: function(component, index) {
|
||||
if (!(component instanceof OpenLayers.Geometry.LineString)) {
|
||||
throw "component should be an OpenLayers.Geometry.LineString";
|
||||
}
|
||||
OpenLayers.Geometry.Collection.prototype.addComponent.apply(this,
|
||||
arguments);
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Geometry.MultiLineString"
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user