[Users] Problem with PrintPreview ux and Proj4js
Thomas Colley
it087 at neath-porttalbot.gov.uk
Tue Oct 23 14:08:27 CEST 2012
Hi
I have created an OpenLayers map with print functionality using the
GeoExt.ux.PrintPreview.
This was working fine until I added the proj4js script to the page. Now
clicking on the Print button gives me the following error
TypeError: p.proj is undefined
if (window.Proj4js && this.proj.defData && p.proj.defData) {
When I click on the Print button 'p' is coming back in Firebug as the
value 'EPSG:4326' instead of an OpenLayers.Projection object as it does
at all other times when viewing the map.
So the main problem is that something is passing projection through as a
value instead of an object so that projection.proj is undefined, and a
further problem is that the value is for the wrong EPSG anyway as my map
is all in ESPG:27700.
Is there somewhere else within the code that I need to define the
projection? It is correctly defined in the map and comes back as
EPSG:27700 { projCode="EPSG:27700", proj={...}, titleRegEx=RegExp,
more...}
in firebug.
I have edited the code in OpenLayers 'Projection.js' to make 'p = new
OpenLayers.Projection("EPSG:27700")' and with this change the print
preview window appears as it should.
Hope somebody can help as I am stuck on this.
Many thanks
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20121023/97065fc4/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 174 bytes
Desc: image001.png
Url : http://www.geoext.org/pipermail/users/attachments/20121023/97065fc4/attachment.png
More information about the Users
mailing list