【问题标题】:'Pink tiles' when using GeoWebCache使用 GeoWebCache 时的“粉红色瓷砖”
【发布时间】:2010-12-21 02:00:56
【问题描述】:

我正在尝试在 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"

一切正常。

谁能指出我哪里出错了?

【问题讨论】:

    标签: javascript openlayers geoserver


    【解决方案1】:

    我没用过GWC,但我猜你自己设置了缓存?如果是这样,我想您必须设置 GWC 将创建它的图块的比例。基于这些假设,我会说您在访问图块时必须使用相同的比例级别。查看您的 GWC 设置,并可能重新创建缓存。

    (使用 WMS 将起作用,因为默认情况下地图数据是动态渲染的,采用您提供的任何参数并从中进行渲染。)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-01-02
      • 1970-01-01
      • 2018-05-28
      • 1970-01-01
      • 2017-08-18
      • 1970-01-01
      相关资源
      最近更新 更多