Hi Rainer,
I had a temporary solution for my point layer, by creating a mirror point of
any point feature on the layer, which will display when the map extent is
within -360 to -180. Like this:
var max_map_bounds = new OpenLayers.Bounds(-180,-90, 180, 90);
/*
* add a mirror point 360 to the west of the feature, so that it will be
displayed
* when the map's extent becomes < -180 as a result of the warpdateline
function
* of the base layer, this is only applicable for point
*/
quakeWfslayer.onFeatureInsert= function(feature) {
if(!feature.isMirror){
if(!feature.onScreen()){
if(!max_map_bounds.contains(this.getExtent().left,
this.getExtent().top)){//feature.geometry.x > 0 &&
var featureMirror = new
OpenLayers.Feature.Vector(
new
OpenLayers.Geometry.Point((feature.geometry.x -
max_map_bounds.getWidth()), feature.geometry.y),
feature.attributes,
feature.style);
featureMirror.isMirror = true;
feature.isMirror = false;
this.addFeatures([featureMirror]);
}
}
}
};
This approach works only for point feature, not sure if this is your case.
Cheers,
Sige
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/WFS-render-problem-with-WMS-wrapDateLine-true-tp5374915p5601498.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users