Only hide features if they don't intersect in a wrapped sense.

This commit is contained in:
tschaub
2011-09-29 19:48:20 -06:00
parent cc81657907
commit 2549935a8a

View File

@@ -182,7 +182,11 @@ OpenLayers.Renderer = OpenLayers.Class({
if (feature.geometry) {
var bounds = feature.geometry.getBounds();
if(bounds) {
if (!bounds.intersectsBounds(this.extent)) {
var worldBounds;
if (this.map.baseLayer && this.map.baseLayer.wrapDateLine) {
worldBounds = this.map.getMaxExtent();
}
if (!bounds.intersectsBounds(this.extent, {worldBounds: worldBounds})) {
style = {display: "none"};
}
var rendered = this.drawGeometry(feature.geometry, style, feature.id);