| 124 | | if (style.display != "none") { |
|---|
| 125 | | //first we create the basic node and add it to the root |
|---|
| 126 | | var nodeType = this.getNodeType(geometry); |
|---|
| 127 | | var node = this.nodeFactory(geometry.id, nodeType); |
|---|
| 128 | | node._featureId = featureId; |
|---|
| 129 | | node._geometryClass = geometry.CLASS_NAME; |
|---|
| 130 | | node._style = style; |
|---|
| 131 | | |
|---|
| 132 | | //now actually draw the node, and style it |
|---|
| 133 | | node = this.drawGeometryNode(node, geometry); |
|---|
| 134 | | this.root.appendChild(node); |
|---|
| 135 | | } else { |
|---|
| 136 | | node = OpenLayers.Util.getElement(geometry.id); |
|---|
| 137 | | if (node) { |
|---|
| 138 | | node.parentNode.removeChild(node); |
|---|
| 139 | | } |
|---|
| 140 | | } |
|---|
| | 124 | //first we create the basic node and add it to the root |
|---|
| | 125 | var nodeType = this.getNodeType(geometry); |
|---|
| | 126 | var node = this.nodeFactory(geometry.id, nodeType); |
|---|
| | 127 | node._featureId = featureId; |
|---|
| | 128 | node._geometryClass = geometry.CLASS_NAME; |
|---|
| | 129 | node._style = style; |
|---|
| | 130 | |
|---|
| | 131 | //now actually draw the node, and style it |
|---|
| | 132 | node = this.drawGeometryNode(node, geometry); |
|---|
| | 133 | this.root.appendChild(node); |
|---|