[OpenLayers-Users] Vertical lines on WMS layer?
Tim Schaub
noreply at geocartic.com
Thu May 24 16:13:48 EDT 2007
Jeff Yutzler wrote:
> When I set the following WMS layer into OpenLayers:
>
> map.addLayer(new OpenLayers.Layer.WMS( "IONIC Natural Earth WMS",
> "http://demo.ionicenterprise.com/ionicweb/map/NATURALEARTH", {layers:
> 'NATURALEARTH'}));
>
> I get behavior I have not seen anywhere else. At most scales, the layer
> looks fine. However, at 1:3M and 1:7M, white vertical lines appear at
> the tile boundaries. I suppose this is a defect in OpenLayers, but I'm
> not really even sure how to describe it. Any ideas?
For tile renderers (WMS servers) that have unsavory edge effects, you
can use the "gutter" option on a layer. This requests a larger tile
than is actually displayed in OpenLayers - hiding ugly tile edges if you
can't control the tiling yourself (with TileCache).
This functionality was introduced during 2.4 development and will be
included in the 2.4 release. (See http://trac.openlayers.org/ticket/529
for details.)
In your case, the following layer definition gets rid of the white tile
edges:
var iconic = new OpenLayers.Layer.WMS("IONIC Natural Earth WMS",
"http://demo.ionicenterprise.com/ionicweb/map/NATURALEARTH",
{layers: 'NATURALEARTH'},
{gutter: 2});
map.addLayer(iconic);
Nice looking map! Obviously, the best solution is to fix the Iconic WMS
- until that is done, use gutters.
Tim
http://wms-sites.com/catalog/Natural-Earth-draped-over-SRTM/NATURALEARTH/
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
More information about the Users
mailing list