[OpenLayers-Dev] comment wrt latest GML update
Eric Lemoine
eric.c2c at gmail.com
Wed Feb 4 15:36:33 EST 2009
On Wed, Feb 4, 2009 at 6:41 PM, Tim Schaub <tschaub at opengeo.org> wrote:
> [...]
> I will argue against making things "consistent" by *not* making use of
> gml:boundedBy.
As Chris mentioned the rendering engine looks at the geometry bounds
to determine whether the feature is drawn or not:
drawFeature: function(feature, style) {
if(style == null) {
style = feature.style;
}
if (feature.geometry) {
var bounds = feature.geometry.getBounds();
if(bounds) {
if (!bounds.intersectsBounds(this.extent)) {
style = {display: "none"};
}
return this.drawGeometry(feature.geometry, style, feature.id);
}
}
},
So if the bounds received from the server aren't incorrect OpenLayers
may not draw the feature while the feature is in the current extent. I
tend to think that determining whether the feature should be drawn or
not is an internal thing that should be based on an internal
calculation.
Cheers,
--
Eric
More information about the Dev
mailing list