[Users] Still having print preview problems
Robert Buckley
robertdbuckley at yahoo.com
Thu Aug 25 08:58:44 CEST 2011
Sorry , I forgot the code and the url
http://maps.zgb.de/www/eeg/gfi.html
// map settings for the mappanel.map
var map = new OpenLayers.Map("map",{
projection:epsg900913,
displayProjection: epsg900913,
units: "m",
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(912352.369449, 6720955.021855,
1391765.410767, 7014473.210418),
restrictedExtent: new OpenLayers.Bounds(871993.618568, 6598044.280668,
1483489.84474, 7087241.261605),
controls: [new OpenLayers.Control.MouseDefaults()
,new OpenLayers.Control.PanZoomBar()
,new OpenLayers.Control.MousePosition()
,new OpenLayers.Control.ScaleLine({geodesic: true})]
});
var printDialog;
// The PrintProvider that connects us to the print service
var printProvider = new GeoExt.data.PrintProvider({
method: "GET", // "POST" recommended for production use
capabilities: printCapabilities, // provide url instead for lazy loading
customParams: {
mapTitle: "ZGB Energieportal" ,
comment:date
}
});
// mappanel for the main app
var mappanel = new GeoExt.MapPanel({
id:'mappanel',
region:"center",
height: 400,
width: 600,
map: map,
bbar:[{
xtype: "label",
text: "Maßstab = 1 : "
}],
tbar: [toolbarItems,'','-',
{
text: "Drucken...",
icon: '../images/printer.png',
tooltip: "kartenansicht in PDF Format exportieren",
handler: function(){
// A window with the PrintMapPanel, which we can use to adjust
// the print extent before creating the pdf.
printDialog = new Ext.Window({
title: "Druckansicht",
layout: "fit",
// autoWidth: true,
height: 400,
width: 300,
items: [{
xtype: "gx_printmappanel",
sourceMap: mappanel,
printProvider: printProvider
}],
bbar: [{
text: "PDF Erstellen...",
handler: function(){
printDialog.items.get(0).print();
}
}]
});
printDialog.show();
}
},
'->','Ortssuche',' ',' ',geoNameSearchCombo]
});
________________________________
Von: Robert Buckley <robertdbuckley at yahoo.com>
An: users at geoext.org
Gesendet: Donnerstag, den 25. August 2011, 8:55:06 Uhr
Betreff: [Users] Still having print preview problems
Hi,
I have been working on this for ages and have never had a satisfactory result.
Maybe someone can help.
I would like a simple print preview window to export a pdf of my mapPanel. I
have the following problems...
1. The gx_printmappanel has either the wrong/or no coordinate system APART
from when I switch the base map to OSM
2. The gx_printmappanel map does not record the zoom level of the mapPanel i.e.
when I zoom in in the main application, the printpreview window is still on
maxextent.
3. When the gx_printmappanel shows the osm baselayer, it is still not printed
4. If I zoom into the printPreview map a few times to find a smaller area which
I want to print ( which shouldn´t be necessary because the printPreview should
take on the view in the mapPanel of the app), I get the following error message
on export
Request denied by WatchGuard HTTP proxy.Reason: request URL path too large
The path is very very long and as far as I can see, every time I zoom the BBOX
is contained in the URL. And this is then blocked by my firewall ( I assume)
I´m sure that the problems 1,2 and 4 will be solved as soon as the printpreview
records the mapPanel of the app.
Any help would be gratefully accepted,
yours,
Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110825/41e188f7/attachment-0001.htm
More information about the Users
mailing list