diff --git a/lib/OpenLayers/Geometry/Collection.js b/lib/OpenLayers/Geometry/Collection.js index 6aa537303a..f02632b1ff 100644 --- a/lib/OpenLayers/Geometry/Collection.js +++ b/lib/OpenLayers/Geometry/Collection.js @@ -70,14 +70,6 @@ OpenLayers.Geometry.Collection.prototype = return geometry; }, - /** - * @returns the components of the geometry - * @type Array(OpenLayers.Geometry) - */ - getComponents: function(){ - return this.components; - }, - /** * @returns the components of the geometry * @type String diff --git a/tests/Geometry/test_Collection.html b/tests/Geometry/test_Collection.html index fe498943c0..e26a3516d6 100644 --- a/tests/Geometry/test_Collection.html +++ b/tests/Geometry/test_Collection.html @@ -83,7 +83,7 @@ coll.addComponents(new OpenLayers.Geometry.Point(10,10)); coll2 = coll.clone(); t.ok( coll2 instanceof OpenLayers.Geometry.Collection, "coll.clone() returns collection object" ); - t.eq( coll2.getComponents().length, 2, "coll2.components.length is set correctly"); + t.eq( coll2.components.length, 2, "coll2.components.length is set correctly"); t.ok( coll2.components[0] instanceof OpenLayers.Geometry.Point, "coll2.components.length is set correctly"); } @@ -95,21 +95,12 @@ coll.addComponents(point); coll.addComponents(new OpenLayers.Geometry.Point(10,10)); coll.removeComponents(coll.components[0]); - t.eq( coll.getComponents().length, 1, "coll.components.length is smaller after removeComponent" ); + t.eq( coll.components.length, 1, "coll.components.length is smaller after removeComponent" ); t.ok( coll.bounds == null, "bounds are nullified after call to remove (to trigger recalc on getBounds()"); bounds = coll.getBounds(); t.eq( bounds.left, 10, "left bound is 10 after removeComponent" ); t.eq( bounds.bottom, 10, "bottom bound is 10 after removeComponent" ); } - - function test_05_Collection_getComponents (t) { - t.plan(1); - - coll = new OpenLayers.Geometry.Collection(); - coll.components = {}; - - t.eq( coll.getComponents(), coll.components, "getComponents returns great"); - } function test_06_Collection_calculateBounds(t) { t.plan( 9 );