我正在尝试在Windows Server 2008上测试基于PostGIS/Geoserver/OpenLayers堆栈的简单web地图。我一直在用这个tutorial和geoserver docs。
当我尝试使用GeoWebCache将WMS图层添加到地图时:
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);我得到了臭名昭著的“粉色瓷砖”。Geoserver中的错误显示:
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我的层似乎配置正确,当我在不使用GeoWebCache的情况下为其提供服务时,只需:
"http://localhost:1979/geoserver/wms"一切都很好。
谁能指出我在哪里犯了错?
发布于 2010-12-21 02:00:56
我没有使用过GWC,但我猜你已经自己设置了缓存?如果是这样的话,我想你必须在GWC创建它的瓦片的地方设置比例。基于这些假设,我想说在访问tiles时,您必须使用相同的比例级别。检查您的GWC设置,也许可以重新创建缓存。
(使用WMS是可行的,因为地图数据在默认情况下是动态渲染的,它接受您为其提供的任何参数并从中渲染。)
https://stackoverflow.com/questions/4381779
复制相似问题