使用 GeoWebCache 层时 Geoserver GetFeatureInfo WMS 请求不起作用

发布于 2024-09-29 19:03:07 字数 248 浏览 3 评论 0原文

在过去的几天里,我一直在尝试从 Geoserver 获取地图 GeoWebCache 图层,以在弹出事件中显示 GetFeatureInfo。当我使用 WMS 图层时,GetFeatureInfo 正在按要求工作。自从我开始使用 GeoWebCache 缓存我的图层以来,我无法 GetFeatureInfo。到目前为止,我认为我应该代理我的 WMS 服务器,但说实话,我真的不知道该怎么做。如果有人知道任何事情或有建议,我将非常感激,并感谢您花时间帮助我。

埃尔谢

I have been trying for the last few days to get my map GeoWebCache layers from Geoserver to display GetFeatureInfo in a popup event. When I was using WMS layers, GetFeatureInfo was working as requested. Ever since I started caching my layers using GeoWebCache, I am unable to GetFeatureInfo. So far I think I am supposed to proxy my WMS server, but honestly I really have no idea what to do. IF anyone knows anything or has suggestions I'd really really appreciate it and thank you for taking your time to help me.

elshae

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

混吃等死 2024-10-06 19:03:07

最后我偶然发现了这里:

http://getsatisfaction.com/opengeo/topics/error_in_wmsgetfeatureinfo#reply_2612983< /a>

new OpenLayers.Control.WMSGetFeatureInfo({

    url: "http://localhost:8080/geoserver/wms", 

    layerUrls: ["http://localhost:8080/geoserver/gwc/service/wms"],

    title: 'Identify features by clicking',

    queryVisible: true

});

原来我缺少的是layerUrls: ["http://localhost:8080/geoserver/gwc/service/wms"]

这意味着:考虑layerUrls(即你的gwc url) ,但向 url(即您的 wms url)发出请求。

埃尔谢

Finally I have stumbled across here:

http://getsatisfaction.com/opengeo/topics/error_in_wmsgetfeatureinfo#reply_2612983

new OpenLayers.Control.WMSGetFeatureInfo({

    url: "http://localhost:8080/geoserver/wms", 

    layerUrls: ["http://localhost:8080/geoserver/gwc/service/wms"],

    title: 'Identify features by clicking',

    queryVisible: true

});

Turns out what I was missing was layerUrls: ["http://localhost:8080/geoserver/gwc/service/wms"]

This means: consider the layerUrls (i.e. your gwc urls), but issue requests to the url (i.e. your wms url).

elshae

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文