Hi Aaron,
OpenLayers can be a bit difficult to get right because it corrects a lot of mistakes for you automatically, but for WMS layers served from tile caches you have to get it right. Will get better with WMTS, I hope 
There are a couple of problems with definition below
- SJW:ORANGE_SERVICE_AREA_VW has SRS EPSG:4326 , but to overlay correctly on Google Maps it has to be EPSG:900913. (I do not believe DisplayProjection affects this, but I could be wrong)
- blow , bhigh : Your extent must match that of the tile grid. Else the requests your client makes do not line up with the grid, which makes GWC return an error
- You define scale from 100 to 50 000 , which is almost certainly not what your tiles are
Here is what I suggest you do:
1) Go to http://localhost:8080/geoserver/gwc/demo , find the EPSG:900913 demo of SJW:ORANGE_SERVICE_AREA_VW
2) Check that it works
3) Save the demo client, should be a very small HTML file.
4) Correct the WMS path for the layer, it's a relative URL that won't work if you move the file
5) Add the Google Maps layer
6) Optionally, add displayProjection and your additional controls, but only after you have the basics working
If you do need specific scales etc, then you must jump into manual configuration. In that case you can also redefine your grid to line up with blow and bhigh, but I don't recommend it.
http://geowebcache.org/trac/wiki/configuration , look for <resolutions>. Assuming you are running 1.7.3, place geowebcache.xml into <geoserver webapp>/WEB-INF/classes
Hope this helps,
-Arne
ps. The "Net" tab in Firebug, a Firefox extension, is excellent for picking up error messages etc.
Aaron_Gundel@anonymised.com wrote:
I'm having issues getting geowebcache to work with openlayers and a google maps base layer..Not sure what the issue is, i've got no problems using the wms itself, but when I try to proxy through gwc, the image doesn't even show up. Any help is greatly appreciated....
Code is a bit involved, so i'll try to pull all the relevant chunks...let me know if anything else is necessary.
*the wms layer... yes, I am running on 8081 and have gwc configured accordingly...*
new OpenLayers.Layer.WMS( this.getName(), "http://devinside.sjwater.com:8081/geoserver/gwc/service/wms",
{
layers: 'SJW:ORANGE_SERVICE_AREA_VW',
srs: 'EPSG:4326',
transparent:true,
format: 'image/png',
isBaseLayer: false
},
{buffer: 0} )
*the google map setup...*
new OpenLayers.Layer.Google(
this.getName(),
{'sphericalMercator': true}
)
*the base map setup...*
this.blow = OpenLayers.Layer.SphericalMercator.forwardMercator(-122.22565, 37.12293); // left bottom
this.bhigh = OpenLayers.Layer.SphericalMercator.forwardMercator(-121.68114, 37.50074); // right top
var options = {
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
units: "m",
controls: [
new OpenLayers.Control.Navigation(),
new OpenLayers.Control.PanZoomBar(),
new OpenLayers.Control.LayerSwitcher(),
new OpenLayers.Control.Permalink(),
new OpenLayers.Control.MousePosition(),
new OpenLayers.Control.NavToolbar()
],
maxResolution: "auto",
maxExtent: new OpenLayers.Bounds(this.blow.lon, this.blow.lat, this.bhigh.lon, this.bhigh.lat),
maxScale: 100,
minScale: 50000,
numZoomLevels:20
};
//, pressureZoneKML, serviceAreaKML, stationKML, transmissionMainKML,
systemMap.map = new OpenLayers.Map('map', options);
*layers are then added accordingly.*
------------------------------------------------------------------------
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p
------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Arne Kepp
OpenGeo - http://opengeo.org
Expert service straight from the developers