Allowing for geometries whose bounds cannot be intersected. Thanks for the quick review Andreas. r=ahocevar (closes #1720)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7957 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -165,11 +165,14 @@ OpenLayers.Renderer = OpenLayers.Class({
|
|||||||
style = feature.style;
|
style = feature.style;
|
||||||
}
|
}
|
||||||
if (feature.geometry) {
|
if (feature.geometry) {
|
||||||
if (!feature.geometry.getBounds().intersectsBounds(this.extent)) {
|
var bounds = feature.geometry.getBounds();
|
||||||
|
if(bounds) {
|
||||||
|
if (!bounds.intersectsBounds(this.extent)) {
|
||||||
style = {display: "none"};
|
style = {display: "none"};
|
||||||
}
|
}
|
||||||
return this.drawGeometry(feature.geometry, style, feature.id);
|
return this.drawGeometry(feature.geometry, style, feature.id);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user