[OpenLayers-Users] pdf export: why the request for tile dimensions of 625x458

Robert Buckley robertdbuckley at yahoo.com
Thu Nov 24 02:39:47 EST 2011


Hi,

Thanks for the reply.

according to my research it is possible. gbrun managed to get this working with TMS services with the help of Matt Prior documented in the link below. The proof is in the online map here

http://gis.catawbacountync.gov/gwc/print_gwc.html

http://www.mail-archive.com/users@geoext.org/msg01973.html


yours,

Rob




________________________________
 Von: Toby R <ramotswa at gmail.com>
An: Robert Buckley <robertdbuckley at yahoo.com> 
Cc: "geoserver-users at lists.sourceforge.net" <geoserver-users at lists.sourceforge.net>; "users at mapfish.org" <users at mapfish.org>; "users at geoext.org" <users at geoext.org>; "users at openlayers.org" <users at openlayers.org> 
Gesendet: 8:25 Donnerstag, 24.November 2011
Betreff: Re: [OpenLayers-Users] pdf export: why the request for tile dimensions of 625x458
 

Hi Robert, 
This may not be entirely helpful however I don't think that mapfish supports printing from a tile cache. The way it works normally is that it sends the request straight to the wms server which can obviously respond to the size it requires. 
The reason you are getting that tile size is because that's the size of the window you are trying to print (I presume). 
As a test, if you were to point your layer_topo straight to the wms does printing work? 


Toby



On 24 Nov 2011, at 06:53, Robert Buckley <robertdbuckley at yahoo.com> wrote:



>
>Hi,
>Problem: I can´t print any tiles coming from geowebcache!
>gridset: 900913
>System: Linux Ubuntu 10.04 / tomcat6 / Geoserver 2.1.2 
>
>
>Javscript
>
>
>// map
>var map = new OpenLayers.Map("map", {
>        id: 'map',
>        projection: new OpenLayers.Projection("EPSG:900913"),
>        displayProjection: new OpenLayers.Projection("EPSG:4326"),
>        units: "m",
>        maxResolution: 156543.0339,
>        maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34),
>        numZoomLevels: 17,
>        controls: [new OpenLayers.Control.MouseDefaults(), new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.MousePosition(), new OpenLayers.Control.ScaleLine({
>            geodesic: true
>        })]
>    });
>
>
>// layer GWC
>var layer_topo = new OpenLayers.Layer.WMS("Topographischekarte", "http://maps.zgb.de/geoserver/gwc/service/wms/", {
>        layers: 'zgb:tk50',
>        projection: "EPSG:900913",
>        format: 'image/png',
>        transparent: true,
>        singleTile: false
>    }, {
>        'buffer': 0,
>        'opacity': 1,
>        'isBaseLayer': true,
>        visibility: true
>    });
>
>
>Geoserver log
>
>
>2011-11-24 07:39:54,199 ERROR [geowebcache.GeoWebCacheDispatcher] - The requested tile dimensions 625x458 do not match those of the grid set (256x256) http://maps.zgb.de/geoserver/gwc/service/wms
>2011-11-24 07:39:54,200 WARN [print.PDFUtils] - Server returned an error for http://maps.zgb.de/geoserver/gwc/service/wms?BBOX=1176787.0%2C6892762.5%2C1181754.1%2C6899536.0&HEIGHT=625&WIDTH=458&map_resolution=75&SERVICE=WMS&REQUEST=GetMap&STYLES=&TILESIZE=%7B%22w%22%3A256%2C%22h%22%3A256%7D&TRANSPARENT=true&VERSION=1.1.1&FORMAT=image%2Fpng&PROJECTION=EPSG%3A900913&format_options=dpi%3A75&LAYERS=zgb%3Atk50&SINGLETILE=false&SRS=EPSG%3A900913: Error (status=400) while reading the image from http://maps.zgb.de/geoserver/gwc/service/wms?BBOX=1176787.0%2C6892762.5%2C1181754.1%2C6899536.0&HEIGHT=625&WIDTH=458&map_resolution=75&SERVICE=WMS&REQUEST=GetMap&STYLES=&TILESIZE=%7B%22w%22%3A256%2C%22h%22%3A256%7D&TRANSPARENT=true&VERSION=1.1.1&FORMAT=image%2Fpng&PROJECTION=EPSG%3A900913&format_options=dpi%3A75&LAYERS=zgb%3Atk50&SINGLETILE=false&SRS=EPSG%3A900913: Bad Request
>
>
>pdf error attatchment
>
>
>java.io.IOException: Error (status=400) while reading the image from http://maps.zgb.de/geoserver/gwc/service/wms?BBOX=1091694.4%2C6741760.5%2C1250642.0%2C6958507.0
>
>
>&HEIGHT=625&WIDTH=458
>&map_resolution=75&SERVICE=WMS&REQUEST=GetMap
>&STYLES=&TILESIZE=%7B%22w%22%3A256%2C%22h%22%3A256%7D&TRANSPARENT=true
>&VERSION=1.1.1&FORMAT=image%2Fpng&PROJECTION=EPSG%3A900913&format_options=dp
>i%3A75&LAYERS=zgb%3Atk50&SINGLETILE=false&SRS=EPSG%3A900913: Bad Request
>
>
>
>
>
>
>
>Can anyone tell me why the mapfish print is requesting tile dimensions  of 625x458?
>
>
>
>
>
>
>Yours with thanks,
>
>
>Rob
>
>
_______________________________________________
>Users mailing list
>Users at lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20111124/088ccbc9/attachment.html


More information about the Users mailing list