[OpenLayers-Users] WFS render problem with WMS wrapDateLine=true

Sige sigenz at yahoo.co.nz
Wed Aug 4 20:36:18 EDT 2010


Hi All,

I have a problem with rendering WFS feature near the dateline along with a
WMS layer (with wrapDateLine=true). The feature location is: 173.71,-40.19.
At first the feature is shown fine, but when the map is moved toward the
West, at some point the feature disappeared.  It likes like at that point
the map bounds becomes something like: [-205.63,-72.10 -147.625,-12.33] 
which I guess is a result of the wrapDateLine, and results in the feature
being excluded from the bounding box although it shouldn't.

My layer definitions are as follows:

var mapOptions = {
    maxResolution: 0.3515625,
    numZoomLevels: 20,
    projection: new OpenLayers.Projection('EPSG:4326'),   
    maxExtent: new OpenLayers.Bounds(-180,-90, 180, 90) 
  };
map = new OpenLayers.Map('haz-map', mapOptions );

var wmslayer = new OpenLayers.Layer.WMS(
    "Map",WMS_URL,
   {
	layers: 'osm', 
	isBaseLayer: true,
	format: 'image/jpeg',	
	maxExtent: new OpenLayers.Bounds(-180,-90, 180, 90)  
},
{
    wrapDateLine: true
} 
);
map.addLayer(wmslayer);

var wfsLayer =new OpenLayers.Layer.Vector(
	"WFS", 
 {
    strategies: [new OpenLayers.Strategy.BBOX()],  
    protocol: new OpenLayers.Protocol.WFS({
    url: WFS_URL,
    geometryName : 'geom',
    srsName: 'EPSG:4326',
    featureType: "haz",
    featureNS: WFS_NS  
  })
 }
 );
map.addLayer(wfsLayer);

Any idea to get the feature to render? 

Thanks
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-render-problem-with-WMS-wrapDateLine-true-tp5374915p5374915.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list