[Geoserver-users] geowebcache tiling zoom and bounds

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

Hi,

getfeatureinfo is currently not supported. I'm looking into proxying requests for this and getlegend (and other things). Should not take long to implement, it is a bit tricky because a single GWC layer may consist of multiple WMS layers. Don't know OpenLayers well enough, but maybe you can define a second layer that hits the WMS server directly?

(I assume you have tiles showing up correctly.)
-Arne

Wes Toews wrote:

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

------------------------------------------------------------------------

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
------------------------------------------------------------------------

_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users