After implementing the changes in this issue fixing using WMS as a baselayer: http://drupal.org/node/878644

one would like to speed up the wms service by implementing for example geowebcache.

Geowebcache is very stringent about the resolutions that openlayers requests. This is circumvented by creating a GridSubSet in the geowebcache.xml file with fixed resolutions.

Once you figure out which resolution openlayers is using to query the webcache (using Firebug) and add them to your GridSubSet, things work fine.

However. This list of resolutions changes for every Preset. It seems openlayers is calculating the resolutions for the BaseLayer based on the extend and some other magic in a way that is so dynamic that each preset uses a different list of resolutions (and definitly not the ones that are generated by openlayers_get_resolutions('900913')

Is there a way to force OpenLayers to always use the same set of resolutions across presets?

Pages that were helpful figuring this out were

http://geowebcache.org/docs/current/configuration/troubleshooting/index....

and

http://geowebcache.org/docs/current/configuration/xml/exhaustive.html

Comments

tmcw’s picture

Okay, just as background:

  • So this works with GeoServer, but doesn't work with GWC because of the resolutions issue?
  • You're using 900913 as the projection for the map & all involved layers?
  • Is the version of OpenLayers you're running running with any patches because of the previous issue?

The reason for the hardcoded maxResolution and the trickery around openlayers_get_resolutions() is for this exact purpose - that, without giving OpenLayers all of the inputs of the resolution equation, it will guess wildly and incorrectly in trying to somehow estimate what resolutions it should ask for. Removing the constraints that this module puts in will make WMS, and all other layer types, much more difficult to configure.

batje’s picture

at the bullets

- yes
- yes
- nope, didnt patch OpenLayers. have this issues with both 2.8 and 2.9. I did patch openlayers (the drupal module) with the 2 small fixes mentioned in http://drupal.org/node/878644

For what i have now, the openlayers_get_resolutions() and other trickery is not resulting in a fixed set of resolutions that i can use in the cache settings. (and i did remove the maxResolution trick to test that.)

At least i got some more pointers to follow.

batje’s picture

Status: Active » Closed (fixed)