我正在尝试在 Windows Server 2008 上测试基于 PostGIS/Geoserver/OpenLayers 堆栈的简单网络地图。我一直在使用本教程和 geoserver文档。
当我尝试使用 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"
一切正常。
谁能指出我在哪里犯错?