[Geoserver-users] [Re: geowebcache tiling zoom and bounds]

Excellent advice (until we have a more permanent solution) :slight_smile:

-------- Original Message --------
hi Arne,
      Yes the tiles display correctly. This is a problem because I do need to have users click on the map and have attribute information returned somehow, preferrably without a separate database query. But I think you helped with a workaround by your suggestion.
     What I implemented through openlayers was a second layer that calls the layers we want to query directly from geoserver, like you suggested. Setting the visibility property to false and displayInLayerSwitcher to false as well makes it seem as though the GWC layer is getting queried, though it's the same layer but hitting Geoserver directly. And the layers accessed directly from Geoserver don't get rendered, which is the whole point.
The drawback is that it looks dumb in the javascript, so this should all be in a separate .js src file
:slight_smile:
Thanks,
-Wes

On 10/09/2008, *Arne Kepp* <ak@anonymised.com <mailto:ak@anonymised.com>> wrote:

    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&quot;,
            {
             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=/
        <http://moblin-contest.org/redirect.php?banner_id=100&url=/&gt;
        ------------------------------------------------------------------------

        _______________________________________________
        Geoserver-users mailing list
        Geoserver-users@lists.sourceforge.net
        <mailto:Geoserver-users@lists.sourceforge.net>
        https://lists.sourceforge.net/lists/listinfo/geoserver-users
         
--
Arne Kepp
http://opengeo.org
OpenGeo: Custom Solutions and Enterprise support
OpenLayers, GeoWebCache and GeoServer