[Users] PrintMapPanel:- how to set to geodesic?
Robert Buckley
robertdbuckley at yahoo.com
Tue Feb 22 12:48:05 CET 2011
Hi,
I have basic printing capabilities bilt into a project which works ok, but the
scale bar which is produced in the resulting pdf file is showing the wrong
scale. It is about 1/3 too long!
I assume this is because it has not been set to geodesic:true but where do I set
this? The code comes from PrintMapPanel.js in the widgets section of geoext, and
there is no reference to a scale bar there.
does anyone know where this originates?
CODE:
var printDialog;
var printProvider = new GeoExt.data.PrintProvider({
method: "GET",
capabilities: printCapabilities,
customParams: {
mapTitle: "ZGB Energieportal",
comment: date
}
});
Excerpt from my mapPanel...
new Ext.Button({
text: "Drucken...",
icon: '../images/printer.png',
tooltip: "kartenansicht in PDF Format exportieren",
handler: function() {
printDialog = new Ext.Window({
items: [new GeoExt.PrintMapPanel({
map: {
projection: epsg900913,
displayProjection: epsg4326,
maxResolution: 156543.0339,
maxExtent: new
OpenLayers.Bounds(912352.369449, 6720955.021855, 1391765.410767, 7014473.210418)
},
sourceMap: mapPanel,
printProvider: {
capabilities: printCapabilities
}
})],
bbar: [{
text: "PDF Erstellen...",
handler: function () {
printDialog.items.get(0).print()
}
}]
});
printDialog.show()
}
})
yours,
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110222/76b6e690/attachment.htm
More information about the Users
mailing list