Files
openlayers/files/OpenLayers/Geometry/Collection-js.html
Tim Schaub 20feef1ae6 commit dev doc example
git-svn-id: http://svn.openlayers.org/sandbox/tschaub/naturaldocs/doc@3432 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2007-06-22 22:50:49 +00:00

59 lines
31 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><title>OpenLayers.Geometry.Collection - OpenLayers</title><link rel="stylesheet" type="text/css" href="../../../styles/main.css"><script language=JavaScript src="../../../javascript/main.js"></script></head><body class=UnframedPage onLoad="NDOnLoad()"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
<!-- Generated by Natural Docs, version 1.35 -->
<!-- http://www.naturaldocs.org -->
<!-- saved from url=(0026)http://www.naturaldocs.org -->
<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td class=MenuSection valign=top><!--START_ND_MENU--><div class=MTitle>OpenLayers<div class=MSubTitle>JavaScript Mapping Library</div></div><div class=MEntry><div class=MFile><a href="../../OpenLayers-js.html">OpenLayers</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent9')">OpenLayers</a><div class=MGroupContent id=MGroupContent9><div class=MEntry><div class=MFile><a href="../BaseTypes-js.html">Base Types</a></div></div><div class=MEntry><div class=MFile><a href="../Console-js.html">Console</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Control</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="../Control-js.html">Control</a></div></div><div class=MEntry><div class=MFile><a href="../Control/ArgParser-js.html">ArgParser</a></div></div><div class=MEntry><div class=MFile><a href="../Control/ZoomToMaxExtent-js.html">ZoomToMaxExtent</a></div></div></div></div></div><div class=MEntry><div class=MFile><a href="../Events-js.html">Events</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Feature</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="../Feature-js.html">Feature</a></div></div><div class=MEntry><div class=MFile><a href="../Feature/WFS-js.html">WFS</a></div></div><div class=MEntry><div class=MFile><a href="../Feature/Vector-js.html">Vector</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Format</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MFile><a href="../Format-js.html">Format</a></div></div><div class=MEntry><div class=MFile><a href="../Format/WKT-js.html">WKT</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent4')">Geometry</a><div class=MGroupContent id=MGroupContent4><div class=MEntry><div class=MFile><a href="../Geometry-js.html">Geometry</a></div></div><div class=MEntry><div class=MFile id=MSelected>Collection</div></div><div class=MEntry><div class=MFile><a href="LineString-js.html">LineString</a></div></div><div class=MEntry><div class=MFile><a href="MultiLineString-js.html">MultiLineString</a></div></div><div class=MEntry><div class=MFile><a href="MultiPoint-js.html">MultiPoint</a></div></div><div class=MEntry><div class=MFile><a href="MultiPolygon-js.html">MultiPolygon</a></div></div><div class=MEntry><div class=MFile><a href="Point-js.html">Point</a></div></div><div class=MEntry><div class=MFile><a href="Polygon-js.html">Polygon</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent5')">Handler</a><div class=MGroupContent id=MGroupContent5><div class=MEntry><div class=MFile><a href="../Handler-js.html">Handler</a></div></div><div class=MEntry><div class=MFile><a href="../Handler/Drag-js.html">Drag</a></div></div><div class=MEntry><div class=MFile><a href="../Handler/Feature-js.html">Feature</a></div></div><div class=MEntry><div class=MFile><a href="../Handler/Keyboard-js.html">Keyboard</a></div></div><div class=MEntry><div class=MFile><a href="../Handler/MouseWheel-js.html">MouseWheel</a></div></div><div class=MEntry><div class=MFile><a href="../Handler/Path-js.html">Path</a></div></div><div class=MEntry><div class=MFile><a href="../Handler/Point-js.html">Point</a></div></div></div></div></div><div class=MEntry><div class=MFile><a href="../Icon-js.html">Icon</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent6')">Layer</a><div class=MGroupContent id=MGroupContent6><div class=MEntry><div class=MFile><a href="../Layer-js.html">Layer</a></div></div><div class=MEntry><div class=MFile><a href="../Layer/GeoRSS-js.html">Layer.<span class=HB> </span>GeoRSS</a></div></div><div class=MEntry><div class=MFile><a href="../Layer/Image-js.html">Layer.<span class=HB> </span>Image</a></div></div><div class=MEntry><div class=MFile><a href="../Layer/Markers-js.html">Layer.<span class=HB> </span>Markers</a></div></div><div class=MEntry><div class=MFile><a href="../Layer/Vector-js.html">Layer.<span class=HB> </span>Vector</a></div></div><div class=MEntry><div class=MFile><a href="../Layer/WMS-js.html">Layer.WMS</a></div></div></div></div></div><div class=MEntry><div class=MFile><a href="../Map-js.html">Map</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent7')">Marker</a><div class=MGroupContent id=MGroupContent7><div class=MEntry><div class=MFile><a href="../Marker-js.html">Marker</a></div></div><div class=MEntry><div class=MFile><a href="../Marker/Box-js.html">Box</a></div></div></div></div></div><div class=MEntry><div class=MFile><a href="../Popup-js.html">Popup</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent8')">Tile</a><div class=MGroupContent id=MGroupContent8><div class=MEntry><div class=MFile><a href="../Tile-js.html">Tile</a></div></div><div class=MEntry><div class=MFile><a href="../Tile/Image-js.html">Image</a></div></div><div class=MEntry><div class=MFile><a href="../Tile/WFS-js.html">WFS</a></div></div></div></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent10')">Index</a><div class=MGroupContent id=MGroupContent10><div class=MEntry><div class=MIndex><a href="../../../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../../../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../../../index/Constants.html">Constants</a></div></div><div class=MEntry><div class=MIndex><a href="../../../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../../../index/Properties.html">Properties</a></div></div><div class=MEntry><div class=MIndex><a href="../../../index/Files.html">Files</a></div></div></div></div></div><script language=JavaScript><!--
if (document.getElementById){for (var menu = 1; menu < 11; menu++){if (menu != 4 && menu != 9){document.getElementById("MGroupContent" + menu).style.display = "none";};};}// --></script><!--END_ND_MENU--></td>
<td class=ContentSection valign=top><div class=CClass id=MainTopic><div class=CTopic><h1 class=CTitle><a name="OpenLayers.Geometry.Collection"></a>OpenLayers.<span class=HB> </span>Geometry.<span class=HB> </span>Collection</h1><div class=CBody><p class=CParagraph>A Collection is exactly what it sounds like: A collection of different Geometries.&nbsp; These are stored in the local parameter <a href="#OpenLayers.Geometry.Collection.components" class=LProperty id=link14 onMouseOver="ShowTip(event, 'tt14', 'link14')" onMouseOut="HideTip('tt14')">components</a> (which can be passed as a parameter to the constructor).</p><p class=CParagraph>As new geometries are added to the collection, they are NOT cloned.&nbsp; When removing geometries, they need to be specified by reference (ie you have to pass in the <b>exact</b> geometry to be removed).</p><p class=CParagraph>The <a href="#OpenLayers.Geometry.Collection.getArea" class=LFunction id=link15 onMouseOver="ShowTip(event, 'tt11', 'link15')" onMouseOut="HideTip('tt11')">getArea</a> and <a href="#OpenLayers.Geometry.Collection.getLength" class=LFunction id=link16 onMouseOver="ShowTip(event, 'tt10', 'link16')" onMouseOut="HideTip('tt10')">getLength</a> functions here merely iterate through the components, summing their respective areas and lengths.</p><p class=CParagraph>Create a new instance with the <a href="#OpenLayers.Geometry.Collection.OpenLayers.Geometry.Collection" class=LFunction id=link17 onMouseOver="ShowTip(event, 'tt15', 'link17')" onMouseOut="HideTip('tt15')">OpenLayers.Geometry.Collection</a> constructor.</p><h4 class=CHeading>Inerhits from</h4><ul class=CBulletList><li><a href="../Geometry-js.html#OpenLayers.Geometry" class=LClass id=link18 onMouseOver="ShowTip(event, 'tt1', 'link18')" onMouseOut="HideTip('tt1')">OpenLayers.Geometry</a></li></ul><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr><td class=SEntrySize><div class=SMain><div class=SEntry><a href="#OpenLayers.Geometry.Collection" >OpenLayers.<span class=HB> </span>Geometry.<span class=HB> </span>Collection</a></div></div></td><td class=SDescriptionSize><div class=SMain><div class=SDescription>A Collection is exactly what it sounds like: A collection of different Geometries. </div></div></td></tr><tr><td><div class=SGroup><div class=SEntry><div class=SIndent1><a href="#OpenLayers.Geometry.Collection.Properties" >Properties</a></div></div></div></td><td><div class=SGroup><div class=SDescription><div class=SIndent1></div></div></div></td></tr><tr class=SMarked><td><div class=SProperty><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Geometry.Collection.components" >components</a></div></div></div></td><td><div class=SProperty><div class=SDescription><div class=SIndent2>{Array(<a href="../Geometry-js.html#OpenLayers.Geometry" class=LClass id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">OpenLayers.Geometry</a>)} The component parts of this geometry</div></div></div></td></tr><tr><td><div class=SGroup><div class=SEntry><div class=SIndent1><a href="#OpenLayers.Geometry.Collection.Functions" >Functions</a></div></div></div></td><td><div class=SGroup><div class=SDescription><div class=SIndent1></div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Geometry.Collection.OpenLayers.Geometry.Collection" >OpenLayers.<span class=HB> </span>Geometry.<span class=HB> </span>Collection</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Creates a Geometry Collection -- a list of geoms.</div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Geometry.Collection.destroy" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">destroy</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Destroy this geometry.</div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Geometry.Collection.clone" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">clone</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Clone this geometry.</div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Geometry.Collection.getComponentsString" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">getComponentsString</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Get a string representing the components for this collection</div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Geometry.Collection.calculateBounds" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">calculateBounds</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Recalculate the bounds by iterating through the components and calling calling extendBounds() on each item</div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Geometry.Collection.addComponents" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">addComponents</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Add components to this geometry.</div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Geometry.Collection.addComponent" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">addComponent</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Add a new component (geometry) to the collection. </div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Geometry.Collection.removeComponents" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">removeComponents</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Remove components from this geometry.</div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Geometry.Collection.removeComponent" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">removeComponent</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Remove a component from this geometry.</div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Geometry.Collection.getLength" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">getLength</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Calculate the length of this geometry</div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Geometry.Collection.getArea" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">getArea</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Calculate the area of this geometry. </div></div></div></td></tr><tr><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Geometry.Collection.move" id=link12 onMouseOver="ShowTip(event, 'tt12', 'link12')" onMouseOut="HideTip('tt12')">move</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Moves a collection in place</div></div></div></td></tr><tr class=SMarked><td><div class=SFunction><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Geometry.Collection.equals" id=link13 onMouseOver="ShowTip(event, 'tt13', 'link13')" onMouseOut="HideTip('tt13')">equals</a></div></div></div></td><td><div class=SFunction><div class=SDescription><div class=SIndent2>Tests for equivalent geometries</div></div></div></td></tr><tr><td><div class=SGroup><div class=SEntry><div class=SIndent1><a href="#OpenLayers.Geometry.Collection.Constants" >Constants</a></div></div></div></td><td><div class=SGroup><div class=SDescription><div class=SIndent1></div></div></div></td></tr><tr class=SMarked><td><div class=SConstant><div class=SEntry><div class=SIndent2><a href="#OpenLayers.Geometry.Collection.CLASS_NAME" >CLASS_NAME</a></div></div></div></td><td><div class=SConstant><div class=SDescription><div class=SIndent2>{String} Name of class.</div></div></div></td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<div class=CGroup><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Geometry.Collection.Properties"></a>Properties</h3></div></div>
<div class=CProperty><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Geometry.Collection.components"></a>components</h3><div class=CBody><p class=CParagraph>{Array(<a href="../Geometry-js.html#OpenLayers.Geometry" class=LClass id=link19 onMouseOver="ShowTip(event, 'tt1', 'link19')" onMouseOut="HideTip('tt1')">OpenLayers.Geometry</a>)} The component parts of this geometry</p></div></div></div>
<div class=CGroup><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Geometry.Collection.Functions"></a>Functions</h3></div></div>
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Geometry.Collection.OpenLayers.Geometry.Collection"></a>OpenLayers.<span class=HB> </span>Geometry.<span class=HB> </span>Collection</h3><div class=CBody><p class=CParagraph>Creates a Geometry Collection -- a list of geoms.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>components</td><td class=CDLDescription>{Array(<a href="../Geometry-js.html#OpenLayers.Geometry" class=LClass id=link20 onMouseOver="ShowTip(event, 'tt1', 'link20')" onMouseOut="HideTip('tt1')">OpenLayers.Geometry</a>)} Optional array of geometries</td></tr></table><h4 class=CHeading>Returns</h4><p class=CParagraph>{OpenLayers.Geometry.Collection} A new geometry collection</p></div></div></div>
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Geometry.Collection.destroy"></a>destroy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>destroy: function ()</td></tr></table></blockquote><p class=CParagraph>Destroy this geometry.</p></div></div></div>
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Geometry.Collection.clone"></a>clone</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>clone: function()</td></tr></table></blockquote><p class=CParagraph>Clone this geometry.</p><h4 class=CHeading>Return</h4><p class=CParagraph>{OpenLayers.Geometry.Collection} An exact clone of this collection</p></div></div></div>
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Geometry.Collection.getComponentsString"></a>getComponentsString</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>getComponentsString: function()</td></tr></table></blockquote><p class=CParagraph>Get a string representing the components for this collection</p><h4 class=CHeading>Return</h4><p class=CParagraph>{String} A string representation of the components of this geometry</p></div></div></div>
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Geometry.Collection.calculateBounds"></a>calculateBounds</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>calculateBounds: function()</td></tr></table></blockquote><p class=CParagraph>Recalculate the bounds by iterating through the components and calling calling extendBounds() on each item</p></div></div></div>
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Geometry.Collection.addComponents"></a>addComponents</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>addComponents: function(</td><td class=PParameter nowrap>components</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p class=CParagraph>Add components to this geometry.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>components</td><td class=CDLDescription>{Array(<a href="../Geometry-js.html#OpenLayers.Geometry" class=LClass id=link21 onMouseOver="ShowTip(event, 'tt1', 'link21')" onMouseOut="HideTip('tt1')">OpenLayers.Geometry</a>)} An array of geometries to add</td></tr></table></div></div></div>
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Geometry.Collection.addComponent"></a>addComponent</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>addComponent: function(</td><td class=PParameter nowrap>component,</td></tr><tr><td></td><td class=PParameter nowrap>index</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p class=CParagraph>Add a new component (geometry) to the collection.&nbsp; If this.componentTypes is set, then the component class name must be in the componentTypes array.</p><p class=CParagraph>The bounds cache is reset.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>component</td><td class=CDLDescription>{<a href="../Geometry-js.html#OpenLayers.Geometry" class=LClass id=link22 onMouseOver="ShowTip(event, 'tt1', 'link22')" onMouseOut="HideTip('tt1')">OpenLayers.Geometry</a>} A geometry to add</td></tr><tr><td class=CDLEntry>index</td><td class=CDLDescription>{int} Optional index into the array to insert the component</td></tr></table><h4 class=CHeading>Return</h4><p class=CParagraph>{Boolean} The component geometry was successfully added</p></div></div></div>
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Geometry.Collection.removeComponents"></a>removeComponents</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>removeComponents: function(</td><td class=PParameter nowrap>components</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p class=CParagraph>Remove components from this geometry.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>components</td><td class=CDLDescription>{Array(<a href="../Geometry-js.html#OpenLayers.Geometry" class=LClass id=link23 onMouseOver="ShowTip(event, 'tt1', 'link23')" onMouseOut="HideTip('tt1')">OpenLayers.Geometry</a>)} The components to be removed</td></tr></table></div></div></div>
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Geometry.Collection.removeComponent"></a>removeComponent</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>removeComponent: function(</td><td class=PParameter nowrap>component</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p class=CParagraph>Remove a component from this geometry.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>component</td><td class=CDLDescription>{<a href="../Geometry-js.html#OpenLayers.Geometry" class=LClass id=link24 onMouseOver="ShowTip(event, 'tt1', 'link24')" onMouseOut="HideTip('tt1')">OpenLayers.Geometry</a>}</td></tr></table></div></div></div>
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Geometry.Collection.getLength"></a>getLength</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>getLength: function()</td></tr></table></blockquote><p class=CParagraph>Calculate the length of this geometry</p><h4 class=CHeading>Return</h4><p class=CParagraph>{Number} The length of the geometry</p></div></div></div>
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Geometry.Collection.getArea"></a>getArea</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>getArea: function()</td></tr></table></blockquote><p class=CParagraph>Calculate the area of this geometry.&nbsp; Note how this function is overridden in <a href="Polygon-js.html#OpenLayers.Geometry.Polygon" class=LClass id=link25 onMouseOver="ShowTip(event, 'tt16', 'link25')" onMouseOut="HideTip('tt16')">OpenLayers.Geometry.Polygon</a>.</p><h4 class=CHeading>Return</h4><p class=CParagraph>{Number} The area of the collection by summing its parts</p></div></div></div>
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Geometry.Collection.move"></a>move</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>move: function(</td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PParameter nowrap>y</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p class=CParagraph>Moves a collection in place</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>x</td><td class=CDLDescription>{Number} The x-displacement (in map units)</td></tr><tr><td class=CDLEntry>y</td><td class=CDLDescription>{Number} The y-displacement (in map units)</td></tr></table></div></div></div>
<div class=CFunction><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Geometry.Collection.equals"></a>equals</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>equals: function(</td><td class=PParameter nowrap>geometry</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p class=CParagraph>Tests for equivalent geometries</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>geometry</td><td class=CDLDescription>{OpenLayers.Geometry}</td></tr></table><h4 class=CHeading>Return</h4><p class=CParagraph>{Boolean} The coordinates are equivalent</p></div></div></div>
<div class=CGroup><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Geometry.Collection.Constants"></a>Constants</h3></div></div>
<div class=CConstant><div class=CTopic><h3 class=CTitle><a name="OpenLayers.Geometry.Collection.CLASS_NAME"></a>CLASS_NAME</h3><div class=CBody><p class=CParagraph>{String} Name of class.</p></div></div></div>
</td>
</tr></table><div class=Footer><!--START_ND_FOOTER-->Generated by <a href="http://www.naturaldocs.org">Natural Docs</a><!--END_ND_FOOTER--></div>
<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CClass>A Geometry is a description of a geographic object. </div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>destroy: function ()</td></tr></table></blockquote>Destroy this geometry.</div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>clone: function()</td></tr></table></blockquote>Clone this geometry.</div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>getComponentsString: function()</td></tr></table></blockquote>Get a string representing the components for this collection</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>calculateBounds: function()</td></tr></table></blockquote>Recalculate the bounds by iterating through the components and calling calling extendBounds() on each item</div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>addComponents: function(</td><td class=PParameter nowrap>components</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Add components to this geometry.</div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>addComponent: function(</td><td class=PParameter nowrap>component,</td></tr><tr><td></td><td class=PParameter nowrap>index</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Add a new component (geometry) to the collection. </div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>removeComponents: function(</td><td class=PParameter nowrap>components</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Remove components from this geometry.</div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>removeComponent: function(</td><td class=PParameter nowrap>component</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Remove a component from this geometry.</div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>getLength: function()</td></tr></table></blockquote>Calculate the length of this geometry</div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>getArea: function()</td></tr></table></blockquote>Calculate the area of this geometry. </div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>move: function(</td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PParameter nowrap>y</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Moves a collection in place</div></div><div class=CToolTip id="tt13"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>equals: function(</td><td class=PParameter nowrap>geometry</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Tests for equivalent geometries</div></div><div class=CToolTip id="tt14"><div class=CProperty>{Array(OpenLayers.Geometry)} The component parts of this geometry</div></div><div class=CToolTip id="tt15"><div class=CFunction>Creates a Geometry Collection -- a list of geoms.</div></div><div class=CToolTip id="tt16"><div class=CClass>Polygon is a collection of Geometry.LinearRings.</div></div><!--END_ND_TOOLTIPS-->
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>