[OpenLayers-Users] wrapDateLine with WMS, map covered by opaque film

Sige sigenz at yahoo.co.nz
Sun Nov 22 15:35:33 EST 2009


I found that wrapDateLine tries to request 
http://maps.geonet.org.nz/tilecache/tilecache.py?LAYERS=nasagm&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-90,-270,0,-180&WIDTH=256&HEIGHT=256
map tiles outside the map extent , such as:
[-90.0, -270.0, 0.0, -180.0], which our tilecache server is unable to
retrieve and responds with an error message:

An error occurred: couldn't calculate tile index for layer nasagm from
([0.0, -270.0, 90.0, -180.0])
  File "/usr/local/tilecache/TileCache/Service.py", line 421, in
modPythonHandler
    host )

While the WMS server of metacarta is able to handle such 
http://labs.metacarta.com/wms/vmap0?LAYERS=basic&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=-90,-270,0,-180&WIDTH=256&HEIGHT=256
request , and responds with an empty blue tile, I guess this might be the
reason for the problem mentioned in my previous post. What should I do on
the tilecache server side to handle request outside the map extent?

Sige




Sige wrote:
> 
> Hi List,
> 
> I am trying to make my wms (tilecached) map wrapped across the date line,
> like:
> 
>  var  map = new OpenLayers.Map( $('map'),
>                             {
>                          maxResolution: 0.3515625,
>                          projection: 'EPSG:4326'
>                             }
>              );      
>            var wms = new OpenLayers.Layer.WMS(
>                   "WMS/Tilecache",
>                    "http://maps.geonet.org.nz/tilecache/tilecache.py?",
>                       {
>                                         format: 'image/png',
>                                         projection: 'EPSG:4326',
>                                         units: 'degrees',      
>                                         maxResolution: 0.3515625,
>                                         layers: 'nasagm',
>                                         isBaseLayer: true,
>                                         reproject: false,        
>                                         buffer: 1
>                                        },
>                    {wrapDateLine: true, reproject: false}  
>                    );
>                   map.addLayer(wms);           
>             map.addControl(new OpenLayers.Control.MousePosition());
>             map.zoomToMaxExtent();
> 
> The map wrapped well, however, when I pan and zoom the map around, part of
> the map or the whole map becomes opaque (like covered by a white film). I
> am not sure if this is caused by my wms (tilecache) or wrapDateLine. The
> WMS map works fine without wrapDateLine.  
> 
> I have also tried the WMS from metacarta.com (mapServer) which works fine:
>        var wms1 = new OpenLayers.Layer.WMS( "OpenLayers Basic",//MapServer
>                         "http://labs.metacarta.com/wms/vmap0",
>                         {layers: 'basic'},
>                         {wrapDateLine: true} );
>                       map.addLayers([ wms1]); 
> 
> Thanks,
> 
> Sige 
> 

-- 
View this message in context: http://n2.nabble.com/wrapDateLine-with-WMS-map-covered-by-opaque-film-tp4016174p4047649.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list