http://github.com/GeoNode/gxp/blob/master/src/script/plugins/WMSSource.js#L98is the code that handles setting up layers in the web viewer.
Basically the process is: Fetch WMS caps doc Find layer by name If the layer advertises a bbox in EPSG:900913, use that. Otherwise, reproject from Lon/Lat to get a bbox in EPSG:900913. That bbox gets set as the maxExtent for the layer, which means that all tiles fetched by OpenLayers will be aligned to some factor-of-2 grid subdivision of that bbox. In the application we also set the layer to use the bottom/left corner of this bbox as the tilesOrigin parameter in WMS requests. I imagine this situation could be improved by making GeoNode's viewer WMS-C aware. I'm not sure we need to make GeoServer do this though; can't we just point straight to GWC for a WMS-C capabilities document? -d On Sun, Aug 29, 2010 at 9:38 PM, Gabriel Roldan <[email protected]> wrote: > Hey GeoNoders, > > I'm working on tighter GWC integration for the GeoServer WMS. So far it's > going well, but I have a couple questions as I'm quite new to OL > development. > > The thing is, with this kind of integration, GWC sits in front of the > normal WMS and if the incomming getmap request matches a GWC tile, then it's > served directly from the cache, providing automatic caching for the regular > WMS. > > This is happening on the following git branch: < > http://github.com/groldan/geoserver_trunk/tree/gwc_integration> > With the previous improvements on truncating the cache based on the > transactions affected area, this makes for a really improved experience and > scalability. > > Tiles served this way are marked as non http cacheable and contain an ETag, > so that the browser must revalidate. In the event the browser has the latest > version already, an HTTP 304 code is returned. > > But there's a thing I need to polish. For all this to actually work, we > need to ensure that the client's layer resolutions match the ones in GWC > (and also the tileOrigin?). > > So I'd appreciate some advise on how to ensure that to the extent possible. > How do the OL clients figure out the tile origin and resolutions when > dealing with the regular WMS? do them just use the CRS area of validity? > > Would it help if we enhance the GeoServer WMS GetCapabilities document to > supply the WMS-C VendorSpecificCapabilities if the GetCapabilities request > comes with TILED=true? > > > Desperately looking for your help :) > Gabriel. > > Gabriel Roldan > [email protected] > Expert service straight from the developers > >
