Only hide features if they don't intersect in a wrapped sense.
This commit is contained in:
@@ -182,7 +182,11 @@ OpenLayers.Renderer = OpenLayers.Class({
|
|||||||
if (feature.geometry) {
|
if (feature.geometry) {
|
||||||
var bounds = feature.geometry.getBounds();
|
var bounds = feature.geometry.getBounds();
|
||||||
if(bounds) {
|
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"};
|
style = {display: "none"};
|
||||||
}
|
}
|
||||||
var rendered = this.drawGeometry(feature.geometry, style, feature.id);
|
var rendered = this.drawGeometry(feature.geometry, style, feature.id);
|
||||||
|
|||||||
Reference in New Issue
Block a user