| | 500 | |
|---|
| | 501 | /** |
|---|
| | 502 | * Method: drawFeature |
|---|
| | 503 | * Overrides the superclass's drawFeature method to take care of features |
|---|
| | 504 | * that are outside the viewport. |
|---|
| | 505 | * |
|---|
| | 506 | * Parameters: |
|---|
| | 507 | * feature - {<OpenLayers.Feature.Vector>} |
|---|
| | 508 | * style - {<Object>} |
|---|
| | 509 | */ |
|---|
| | 510 | drawFeature: function(feature, style) { |
|---|
| | 511 | if (!feature.geometry.getBounds().intersectsBounds(this.extent)) { |
|---|
| | 512 | style = {display: "none"}; |
|---|
| | 513 | } |
|---|
| | 514 | OpenLayers.Renderer.Elements.prototype.drawFeature.apply(this, |
|---|
| | 515 | [feature, style]); |
|---|
| | 516 | }, |
|---|