First off, if you want to use the standard GeoServer WMS endpoint with
caching, you need to make sure that you have Direct Integration enabled.
Second, you need to make sure the layer is configured for caching and that
you have set it up with the correct format, gridset, parameter filters, et
to handle your request. If anything doesn't match, it will fall back to
using GeoServer's WMS service directly without any caching.
OpenLayers isn't able to read the gridset information from a WMS-C
GetCapabilities document so if you give it a layer using a custom gridset
it will simply guess how the tiles are laid out and make requests on that
basis. If it guesses wrong, then the requests won't line up with the cache
and GWC won't be able to handle it. If you're using GWC directly you'll
get an error, while if you're using the regular GeoServer WMS endpoint with
Direct Integration enabled, it will fall back to using the WMS without
caching.
If you want to ensure that things are cached, use a dedicated GWC endpoint
instead as it will fail outright if you get anything wrong rather than
silently skipping caching. The GWC endpoints are
/geoserver/gwc/service/wms, /geoserver/gwc/service/tms, and
/geoserver/gwc/service/wmtsdepending on which protocol you prefer. You
don't need Direct Integration enabled if you are doing this.
In order to use any gridset other than the standard Web Mercator or WGS84
ones you have to tell OpenLayers the exact parameters of that gridset, at
least if you're using WMS-C. You may have better luck with TMS or WMTS.
If you look at the GWC layer preview (not the regular GeoServer one) it
will use OpenLayers 2 with the necessary information so you can take a look
at how you need to set things up.
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users