drawGeometry: function(geometry, style, featureId) { var className = geometry.CLASS_NAME; if ((className == "OpenLayers.Geometry.Collection") || (className == "OpenLayers.Geometry.MultiPoint") || (className == "OpenLayers.Geometry.MultiLineString") || (className == "OpenLayers.Geometry.MultiPolygon")) { for (var i = 0; i < geometry.components.length; i++) { this.drawGeometry(geometry.components, style, featureId); } return; };
//first we create the basic node and add it to the root var nodeType = this.getNodeType(geometry); var node = this.nodeFactory(geometry.id, nodeType, geometry); node._featureId = featureId; node._geometryClass = geometry.CLASS_NAME; node._style = style; this.root.appendChild(node);
//now actually draw the node, and style it this.drawGeometryNode(node, geometry); }