Pergunta

I'm trying to test simple web map based on PostGIS/Geoserver/OpenLayers stack on Windows Server 2008. I've been using this tutorial and geoserver docs.

When I try to add WMS layer to my map using GeoWebCache:

    var index1d = new OpenLayers.Layer.WMS(
        "Index1",
        "http://localhost:1979/geoserver/gwc/service/wms",
        {'layers': "Index2000:index1d",
         'format': "image/png",
         'transparent': true
        },
        {'opacity': 1.0, 'isBaseLayer': true}

    );
    map.addLayer(index1d);

I get infamous 'pink tiles'. Error in Geoserver says:

ERROR [geowebcache.GeoWebCacheDispatcher] - Requested horizontal resolution:
750.0000000000005 , best match: 632.4668417968734 exceeds 10% threshold. 
Perhaps the client is configured  with an incorrect set of scales (resolutions),  
or the DPI setting is off compared to the one in GWC ? http://localhost:
1979/geoserver/gwc/service/wms

My layer seems to be configured correctly and when I serve it without GeoWebCache with simply:

"http://localhost:1979/geoserver/wms"

everything works fine.

Could anyone point where I'm making mistake?

Foi útil?

Solução

I haven't used GWC, but I guess you have set up the cache yourself? If so, I suppose you had to set the scales where GWC would create it's tiles. Building on these assumptions, I would say that you then must use the same scale levels when accessing the tiles. Look over your GWC settings and maybe recreate the cache.

(Using WMS will work because the map data by default is rendered on the fly, taking whatever parameters you supply it with and rendering from that.)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top