[OpenLayers-Users] geowebcache tiling zoom and bounds
Wes Toews
wolfsnipes at gmail.com
Wed Sep 10 12:57:33 EDT 2008
---------- Forwarded message ----------
From: Wes Toews <wolfsnipes at gmail.com>
Date: 10 Sep 2008 09:56
Subject: geowebcache tiling zoom and bounds
To: geoserver-users at lists.sourceforge.net
hi, I have an issue with openlayers/gwc integration. I have built an
application using gwc, openlayers and geoserver, and it works fine except
for implementing the getfeatureinfo request. When clicking on a map
feature, I receive the documented problem of:
"The bounds result in a zoom level of 6.359755367181556, expected something
within 0.05 of an integer, check
-115.386772,51.632202,-111.003228,54.367798"
I have read the documentation on this, set the maxResolution parameter to
0.703125 as recommended in the documentation; as well I've played
with combinations of zoom levels and maxResolutions, starting zoom and
maxResolution parameters. The resulting tiles are 256x256 pixels size.
my openlayers code looks something like this:
var mapOptions = {
maxExtent: new OpenLayers.Bounds(-180,-90,90,180),
units: 'degrees',
projection: "EPSG:4326",
maxResolution: 0.703125
};
function OLMapInit()
{
map = new OpenLayers.Map('map', mapOptions);
var myLayer = new OpenLayers.Layer.WMS("TRSI Projects","
http://localhost:8080/geowebcache/service/wms",
{
layers: 'TerraWorld',
format: 'image/png'
});
map.addLayer(myLayer);
map.zoomToExtent(initialZoomExtents);
//map.zoomToMaxExtent();
The getfeatureinfo request is standard stuff borrowed from the Geoserver
example code, nothing changed. This generates the zoom level error cited
above. Any ideas?
Thanks in advance,
-Wes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080910/d999d15d/attachment.html
More information about the Users
mailing list